Static Public Member Functions | |
static MXA_EXPORT std::string | getSeparator () |
static MXA_EXPORT bool | isDirectory (const std::string &path) |
Is the path specified a directory on the filesystem. | |
static MXA_EXPORT bool | isFile (const std::string &path) |
Does the path designate a file on the file system. | |
static MXA_EXPORT bool | isRelativePath (const std::string &path) |
Returns true if the path is a relative path but does not determine if the file actually exists or not @param path The path to check. | |
static MXA_EXPORT bool | isAbsolutePath (const std::string &path) |
Returns true if the path is an absolute path. On Unix this means the first character is '/' and on windows the path starts with 'Drive:\' or '\' @param path The path to check. | |
static MXA_EXPORT std::string | currentPath () |
Returns the current path. | |
static MXA_EXPORT std::string | parentPath (const std::string &path) |
Returns the path to the parent directory. | |
static MXA_EXPORT std::string | absolutePath (const std::string &path) |
Either calculates an absolute path or returns the same string if it already indicates an absolute path. No Attempt is made to actually determine if the file exists or not. The path will be free of any extra './' or '..' in the path but symbolic links will possibly be in the path. | |
static MXA_EXPORT std::vector< std::string > | entryList (const std::string &path) |
Returns a list of the contents of a directory. No filtering is attempted. | |
static MXA_EXPORT uint64 | fileSize (const std::string &path) |
Get the size of the file in bytes. | |
static MXA_EXPORT bool | exists (const std::string &path) |
Does the path actually exist on the file system. | |
static MXA_EXPORT std::string | extension (const std::string &path) |
Get any file extension on the filepath. | |
static MXA_EXPORT std::string | filename (const std::string &path) |
Return the filename WITH the extension. | |
static MXA_EXPORT std::string | fileNameWithOutExtension (const std::string &path) |
Returns the filename without the extension. | |
static MXA_EXPORT bool | mkdir (const std::string &path, bool createParentDirectories) |
Create a directory or structure of directories. | |
static MXA_EXPORT bool | rmdir (const std::string &path, bool recurseParentDirectories) |
Removes a directory from the file system. Note that the directory must be empty, including hidden files. | |
static MXA_EXPORT bool | remove (const std::string &path) |
Remove a file from the filesystem. | |
static MXA_EXPORT std::string | cleanPath (const std::string &path) |
Cleans a file system path of extra './', '//' and '/../' elements. | |
static MXA_EXPORT std::string | fromNativeSeparators (const std::string &path) |
Converts from native directory separators to unix separators. | |
static MXA_EXPORT std::string | toNativeSeparators (const std::string &path) |
Converts a path to use native directory separators. | |
Static Public Attributes | |
static MXA_EXPORT const char | Separator = '/' |
static MXA_EXPORT const char | UnixSeparator = '/' |
static MXA_EXPORT const char | Dot = '.' |
Protected Member Functions | |
MXAFileSystemPath () | |
~MXAFileSystemPath () | |
Private Member Functions | |
MXAFileSystemPath (const MXAFileSystemPath &) | |
void | operator= (const MXAFileSystemPath &) |
MXAFileSystemPath::MXAFileSystemPath | ( | ) | [protected] |
MXAFileSystemPath::~MXAFileSystemPath | ( | ) | [protected] |
MXAFileSystemPath::MXAFileSystemPath | ( | const MXAFileSystemPath & | ) | [private] |
std::string MXAFileSystemPath::getSeparator | ( | ) | [static] |
bool MXAFileSystemPath::isDirectory | ( | const std::string & | path | ) | [static] |
Is the path specified a directory on the filesystem.
path | Path to examine |
bool MXAFileSystemPath::isFile | ( | const std::string & | path | ) | [static] |
Does the path designate a file on the file system.
path | Path to examine |
bool MXAFileSystemPath::isRelativePath | ( | const std::string & | path | ) | [static] |
Returns true if the path is a relative path but does not determine if the file actually exists or not @param path The path to check.
bool MXAFileSystemPath::isAbsolutePath | ( | const std::string & | path | ) | [static] |
Returns true if the path is an absolute path. On Unix this means the first character is '/' and on windows the path starts with 'Drive:\' or '\' @param path The path to check.
std::string MXAFileSystemPath::currentPath | ( | ) | [static] |
Returns the current path.
std::string MXAFileSystemPath::parentPath | ( | const std::string & | path | ) | [static] |
Returns the path to the parent directory.
path | The path to return the parent path |
std::string MXAFileSystemPath::absolutePath | ( | const std::string & | path | ) | [static] |
Either calculates an absolute path or returns the same string if it already indicates an absolute path. No Attempt is made to actually determine if the file exists or not. The path will be free of any extra './' or '..' in the path but symbolic links will possibly be in the path.
path | The path to check/convert |
std::vector< std::string > MXAFileSystemPath::entryList | ( | const std::string & | path | ) | [static] |
Returns a list of the contents of a directory. No filtering is attempted.
path | The path to the directory |
uint64 MXAFileSystemPath::fileSize | ( | const std::string & | path | ) | [static] |
Get the size of the file in bytes.
bool MXAFileSystemPath::exists | ( | const std::string & | path | ) | [static] |
Does the path actually exist on the file system.
path | Path to examine |
std::string MXAFileSystemPath::extension | ( | const std::string & | path | ) | [static] |
Get any file extension on the filepath.
path | Path to examine |
std::string MXAFileSystemPath::filename | ( | const std::string & | path | ) | [static] |
Return the filename WITH the extension.
path | Path to examine |
std::string MXAFileSystemPath::fileNameWithOutExtension | ( | const std::string & | path | ) | [static] |
Returns the filename without the extension.
path | Path to examine |
bool MXAFileSystemPath::mkdir | ( | const std::string & | path, | |
bool | createParentDirectories | |||
) | [static] |
Create a directory or structure of directories.
path | The path to create | |
createParentDirectories | If true then any directories missing from the path will also be created. |
bool MXAFileSystemPath::rmdir | ( | const std::string & | path, | |
bool | recurseParentDirectories | |||
) | [static] |
Removes a directory from the file system. Note that the directory must be empty, including hidden files.
path | to delete from the filesystem | |
recurseParentDirectories |
bool MXAFileSystemPath::remove | ( | const std::string & | path | ) | [static] |
Remove a file from the filesystem.
path | The path to the file to remove |
std::string MXAFileSystemPath::cleanPath | ( | const std::string & | path | ) | [static] |
Cleans a file system path of extra './', '//' and '/../' elements.
path | Path to clean |
std::string MXAFileSystemPath::fromNativeSeparators | ( | const std::string & | path | ) | [static] |
Converts from native directory separators to unix separators.
path | The path to conver |
std::string MXAFileSystemPath::toNativeSeparators | ( | const std::string & | path | ) | [static] |
Converts a path to use native directory separators.
path | The path to convert |
void MXAFileSystemPath::operator= | ( | const MXAFileSystemPath & | ) | [private] |
MXA_EXPORT const char MXAFileSystemPath::Separator = '/' [static] |
MXA_EXPORT const char MXAFileSystemPath::UnixSeparator = '/' [static] |
MXA_EXPORT const char MXAFileSystemPath::Dot = '.' [static] |