8 #ifndef META_OCEAN_IO_DIRECTORY_H
9 #define META_OCEAN_IO_DIRECTORY_H
80 bool remove(
const bool recursively =
false)
const;
108 Files findFiles(
const std::string& fileType = std::string(
"*"),
const bool recursive =
false)
const;
159 #if defined(__APPLE__)
243 *
this = std::move(scopedDirectory);
This class holds a directory.
Definition: Directory.h:36
static Directory createTemporaryDirectoryApple()
Creates a new temporary directory (specialization for Apple platforms).
static Directory createTemporaryDirectory()
Creates a new temporary directory.
bool remove(const bool recursively=false) const
Removes this directory from the filesystem.
Directory & operator--()
Removes the last sub-directory from this directory.
virtual bool exists() const
Returns whether the directory exists already.
Directory(const std::string &path)
Creates a new directory.
Directory operator--(int)
Removes the last sub-directory from this 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.
std::string name() const
Returns the name of a directory.
Directory()
Creates an empty directory.
File operator+(const File &file) const
Returns a file composed of this directory and a relative file.
static bool existsApple(const std::string &directory)
Returns whether a directory exists (specialization for Apple platforms).
Directories findDirectories(const bool recursive=false) const
Returns all directories of this directory.
Directory(const File &file)
Creates a new directory by a given file.
Directory & operator+=(const Directory &path)
Adds an relative path to this directory.
Directory(const Path &path)
Creates a new directory by a given path.
virtual bool isValid() const
Returns whether the directory is valid.
Directory operator+(const Directory &path) const
Returns a directory composed of this and a relative directory.
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.
This class holds a file.
Definition: File.h:36
This class holds a path.
Definition: Path.h:27
This class implements a scoped directory object which will delete the underlying directory (and sub-d...
Definition: Directory.h:186
~ScopedDirectory()
Destructs this object and deletes the actual directory.
ScopedDirectory & operator=(const ScopedDirectory &scopedDirectory)=delete
Disabled copy constructor.
ScopedDirectory(const ScopedDirectory &scopedDirectory)=delete
Disabled copy constructor.
ScopedDirectory()=default
Default constructor creating an invalid object not holding any directory.
ScopedDirectory & operator=(ScopedDirectory &&scopedDirectory)
Move operator.
std::vector< Directory > Directories
Definition of a vector holding directories.
Definition: Directory.h:22
std::vector< File > Files
Definition of a vector holding files.
Definition: File.h:23
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15