![]() |
ImFusion SDK 4.3
|
Classes and functions to manipulate files and directories, and the paths that identify them. More...
Classes and functions to manipulate files and directories, and the paths that identify them.
Classes | |
class | Directory |
Entity representing a Directory in the filesystem. More... | |
class | File |
Entity representing a file in the filesystem. More... | |
class | Path |
Entity representing a path in the filesystem. More... | |
struct | SpaceInfo |
Simple structure representing the total and remaining disk space. More... | |
class | TemporaryDirectory |
Temporary directory which deletes itself upon going out of scope. More... | |
class | TemporaryFile |
Temporary file which deletes itself upon going out of scope. More... | |
class | Url |
Entity representing a URL (Uniform Resource Locator). More... | |
Enumerations | |
enum class | CopyOptions { None = 0 , SkipExistingFiles = 1 << 0 , OverwriteExistingFiles = 1 << 1 , Recursive = 1 << 3 , DirectoriesOnly = 1 << 4 } |
Bitflag enumeration to configure calls to copy(). More... | |
Functions | |
Path | currentWorkingDirectory () |
Returns the current working directory. | |
bool | setCurrentWorkingDirectory (const Path &path) |
Sets the current working directory. | |
Path | tempDirectory () |
Returns the location of the directory for temporary files for the current platform. | |
Path | homeDirectory () |
Returns the location of the "home" directory if possible, otherwise returns an empty Path object and logs an error message. | |
Path | configDirectory () |
Returns the location of the directory for configuration files for the current platform. | |
Path | randomPath (const Path &model="%%%%-%%%%-%%%%-%%%%") |
Generates a random path based on the provided model, where it replaces each percent sign character by a random hexadecimal digit. | |
Path | commonParentDirectory (const std::vector< Path > &filepaths) |
Returns the most common parent directory of all given files. | |
bool | isPortableFilename (const std::string &filename) |
Checks whether the given string forms a valid filename on common environments such as POSIX and Windows. | |
std::string | makePortableFilename (const std::string &filename, char replacementCharacter='_') |
Checks the given string for any characters that would be invalid on common environments such as POSIX and Windows and replaces them with the provided replacementCharacter. | |
Path | removeTrailingSlash (const Path &path) |
Returns a Path with no trailing path separators (On Windows '\' as well as POSIX '/' will be considered). | |
bool | copy (const Path &source, const Path &destination, Flags< CopyOptions > copyOptions=CopyOptions::None, std::function< bool(const Path &sourcePath)> filter=nullptr) |
Copies files and/or directories from source to destination based on the provided options and optional filter. | |
bool | rename (const Path &from, const Path &to) |
Rename the given file/directory. | |
bool | createDirectories (const Path &path) |
Recursively creates the directories in the given path in case they do not exist yet. | |
bool | remove (const Path &path) |
Non-recursively deletes the given file/directory. | |
bool | removeRecursive (const Path &path) |
Recursively deletes the given file/directory and all of its contents. | |