|
static nctl::String | joinPath (const nctl::String &first, const nctl::String &second) |
| Joins together two path components.
|
|
static nctl::String | absoluteJoinPath (const nctl::String &first, const nctl::String &second) |
| Returns the absolute path after joining together two path components.
|
|
static nctl::String | dirName (const char *path) |
| Returns the path up to, but not including, the final separator.
|
|
static nctl::String | baseName (const char *path) |
| Returns the path component after the final separator.
|
|
static nctl::String | absolutePath (const char *path) |
| Returns an absolute path from a relative one.
|
|
static const char * | extension (const char *path) |
| Returns the extension position in the string or nullptr if it is not found.
|
|
static bool | hasExtension (const char *path, const char *extension) |
| Returns true if the path has the specified extension (case-insensitive comparison)
|
|
static bool | fixExtension (nctl::String &path, const char *extension) |
| Returns true if the path has been changed to fix the extension.
|
|
static unsigned long | logicalDrives () |
| Returns a bitmask representing the currently available disk drives on Windows.
|
|
static const char * | logicalDriveStrings () |
| Returns a buffer with strings that specify valid drives in the system on Windows.
|
|
static nctl::String | executableDir () |
| Returns the path of the directory where the executable resides.
|
|
static nctl::String | currentDir () |
| Returns the path of the current working directory.
|
|
static bool | setCurrentDir (const char *path) |
| Sets the current working directory, the starting point for interpreting relative paths.
|
|
static bool | isDirectory (const char *path) |
| Returns true if the specified path is a directory.
|
|
static bool | isFile (const char *path) |
| Returns true if the specified path is a file.
|
|
static bool | exists (const char *path) |
| Returns true if the file or directory exists.
|
|
static bool | isReadable (const char *path) |
| Returns true if the file or directory is readable.
|
|
static bool | isWritable (const char *path) |
| Returns true if the file or directory is writeable.
|
|
static bool | isExecutable (const char *path) |
| Returns true if the file or directory is executable.
|
|
static bool | isReadableFile (const char *path) |
| Returns true if the path is a file and is readable.
|
|
static bool | isWritableFile (const char *path) |
| Returns true if the path is a file and is writeable.
|
|
static bool | isHidden (const char *path) |
| Returns true if the file or directory is hidden.
|
|
static bool | setHidden (const char *path, bool hidden) |
| Makes a file or a directory hidden or not.
|
|
static bool | createDir (const char *path) |
| Creates a new directory.
|
|
static bool | deleteEmptyDir (const char *path) |
| Deletes an empty directory.
|
|
static bool | deleteFile (const char *path) |
| Deletes a file.
|
|
static bool | rename (const char *oldPath, const char *newPath) |
| Renames or moves a file or a directory.
|
|
static bool | copy (const char *oldPath, const char *newPath) |
| Copies a file.
|
|
static long int | fileSize (const char *path) |
| Returns the file size in bytes.
|
|
static FileDate | lastModificationTime (const char *path) |
| Returns the last time the file or directory was modified.
|
|
static FileDate | lastAccessTime (const char *path) |
| Returns the last time the file or directory was accessed.
|
|
static int | permissions (const char *path) |
| Returns the file or directory permissions in a mask.
|
|
static bool | changePermissions (const char *path, int mode) |
| Sets the file or directory permissions to those of the mask.
|
|
static bool | addPermissions (const char *path, int mode) |
| Adds the permissions in the mask to a file or a directory.
|
|
static bool | removePermissions (const char *path, int mode) |
| Removes the permissions in the mask from a file or a directory.
|
|
static const nctl::String & | dataPath () |
| Returns the base directory for data loading.
|
|
static const nctl::String & | homePath () |
| Returns the current user home directory.
|
|
static const nctl::String & | savePath () |
| Returns the writable directory for saving data.
|
|
static const nctl::String & | cachePath () |
| Returns the writable directory for saving cache data.
|
|
File system related methods.