This class implements a scoped directory object which will delete the underlying directory (and sub-directories including all files) from the filesystem when the scope ends.
More...
|
| ScopedDirectory ()=default |
| Default constructor creating an invalid object not holding any directory.
|
|
| ScopedDirectory (ScopedDirectory &&scopedDirectory) |
| Move constructor.
|
|
| ScopedDirectory (const Directory &directory) |
| Create a new scoped directory.
|
|
| ScopedDirectory (const std::string &directory) |
| Create a new scoped directory.
|
|
| ~ScopedDirectory () |
| Destructs this object and deletes the actual directory.
|
|
ScopedDirectory & | operator= (ScopedDirectory &&scopedDirectory) |
| Move operator.
|
|
| Directory () |
| Creates an empty directory.
|
|
| Directory (const std::string &path) |
| Creates a new directory.
|
|
| Directory (const File &file) |
| Creates a new directory by a given file.
|
|
| Directory (const Path &path) |
| Creates a new directory by a given path.
|
|
virtual bool | isValid () const |
| Returns whether the directory is valid.
|
|
virtual bool | exists () const |
| Returns whether the directory exists already.
|
|
bool | remove (const bool recursively=false) const |
| Removes this directory from the filesystem.
|
|
bool | create () const |
| Create all necessary sub-directories for the given path, if they do not exist.
|
|
std::string | base () const |
| Returns the base of this directory.
|
|
std::string | name () const |
| Returns the name of a directory.
|
|
Files | findFiles (const std::string &fileType=std::string("*"), const bool recursive=false) const |
| Returns all files in the directory with the given file format.
|
|
Directories | findDirectories (const bool recursive=false) const |
| Returns all directories of this directory.
|
|
File | operator+ (const File &file) const |
| Returns a file composed of this directory and a relative file.
|
|
Directory | operator+ (const Directory &path) const |
| Returns a directory composed of this and a relative directory.
|
|
Directory & | operator+= (const Directory &path) |
| Adds an relative path to this directory.
|
|
Directory & | operator-- () |
| Removes the last sub-directory from this directory.
|
|
Directory | operator-- (int) |
| Removes the last sub-directory from this directory.
|
|
virtual | ~Path ()=default |
| Destructs a path.
|
|
Type | type () const |
| Returns the type of this path.
|
|
bool | isAbsolute () const |
| Returns whether this path is absolute.
|
|
bool | isRelative () const |
| Returns whether this path is relative.
|
|
bool | isNull () const |
| Returns whether this path holds no valid.
|
|
bool | operator== (const Path &right) const |
| Returns whether two paths are equal.
|
|
bool | operator!= (const Path &path) const |
| Returns whether two paths are not equal.
|
|
const std::string & | operator() () const |
| Returns the value of this path.
|
|
bool | operator< (const Path &path) const |
| Less operator comparing the actual strings of two paths.
|
|
This class implements a scoped directory object which will delete the underlying directory (and sub-directories including all files) from the filesystem when the scope ends.
- See also
- Directory