This class provides functionality for working with directories.
#include <utility/YiDir.h>
Static Public Member Functions | |
static const CYIString & | GetSeparator () |
static CYIString | RemoveTrailingSeparators (CYIStringView path) |
static std::vector< CYIString > | GetListing (const CYIString &directoryName) |
static bool | AreDirectoryOperationsSupportedIn (const CYIString &path) |
static bool | DirectoryExists (const CYIString &path) |
static bool | IsDirectory (const CYIString &path) |
static bool | CreateDirectory (const CYIString &path, bool createParents=false) |
static bool | RemoveDirectory (const CYIString &path) |
|
static |
Returns true if directories can be created and destroyed within the specified path.
|
static |
Creates the final directory in an absolute or relative path. If createParents is true, also creates all listed directories leading up to the final directory. Returns true if directory exists or has been created.
|
static |
Returns true if directory exists at the absolute or relative path specified (and is actually a directory).
Returns a list of files and folders contained in the directory specified by directoryName.
The list will be empty if the directory is empty, the specified path is not a directory, or the specified path does not exist.
|
static |
Returns the native directory separator character for the current platform. On Windows, it would be '\' and on Unix and Unix-derivative systems it would be '/'.
|
static |
Returns true if the file at path exists and is a directory. Absolute and relative paths are supported.
|
static |
Removes the final directory in an absolute or relative path if it is empty. Returns true if removal is successful.
|
static |
Returns the path with any trailing directory separators removed. For example, calling this function with the path /foo/bar/
results in /foo/bar
being returned.
/
is left unmodified as it represents the root directory on Unix platforms.