Enumerations | |
| enum | FilterSpec { Dirs = 0x001, Files = 0x002, Drives = 0x004, NoSymLinks = 0x008, All = 0x007, TypeMask = 0x00F, Readable = 0x010, Writable = 0x020, Executable = 0x040, RWEMask = 0x070, Modified = 0x080, Hidden = 0x100, System = 0x200, AccessMask = 0x3F0 } |
| enum | SortSpec { Name = 0x00, Time = 0x01, Size = 0x02, Unsorted = 0x03, SortByMask = 0x03, DirsFirst = 0x04, Reversed = 0x08, IgnoreCase = 0x10 } |
Methods | |
| String | absFilePath (String file) const |
| String | absPath () const |
| String | canonicalPath () const |
| Boolean | cd (String dirName) |
| Boolean | cdUp () |
| Boolean | copy (String srcFile, String destFile) const |
| String | dirName () const |
| Array | entryList (Array filters, Number filterSpec=-1, Number sortSpec=-1) const |
| Array | entryList (String filter, Number filterSpec=-1, Number sortSpec=-1) const |
| Boolean | exists () const |
| Boolean | fileExists (String fileName) const |
| String | filePath (String file) const |
| Boolean | isAbsolute () const |
| Boolean | isReadable () const |
| Boolean | isRelative () const |
| Boolean | isRoot () const |
| Boolean | mkdir (String dirName="") const |
| Boolean | mkdirs (String dirName="") const |
| Boolean | mkpath (String dirName="") const |
| Boolean | move (String srcFile, String destFile) const |
| String | path () const |
| void | refresh () const |
| String | relativeFilePath (String file) const |
| Boolean | remove (String fileName) const |
| Boolean | rename (String oldName, String newName) |
| Boolean | rmdir (String dirName="") const |
| Boolean | rmdirs (String dirName="") const |
| Boolean | rmpath (String dirName="") const |
| Boolean | setCurrent () const |
| void | setPath (String newPath) |
Constructors | |
| DzDir (String path) | |
This class provides access to the file system directory structure. It provides functions for creating, removing, traversing, and searching directories.
| enum DzDir::FilterSpec |
Filtering flags
| enum DzDir::SortSpec |
| DzDir::DzDir | ( | String | path | ) |
Create a dir with the given path name
| QString DzDir::absPath | ( | ) | const |
| QString DzDir::canonicalPath | ( | ) | const |
| bool DzDir::cdUp | ( | ) |
Changes directory to the parent directory. Equivalent to calling cd( ".." );
Makes a copy of a file.
| srcFile | The path of the source file to copy. | |
| destFile | The path of the file that source will be copied to. |
| QString DzDir::dirName | ( | ) | const |
| bool DzDir::exists | ( | ) | const |
| fileName | The relative name of the file to check for. |
| bool DzDir::isAbsolute | ( | ) | const |
| bool DzDir::isReadable | ( | ) | const |
| bool DzDir::isRelative | ( | ) | const |
| bool DzDir::isRoot | ( | ) | const |
Creates a new directory.
| dirName | The relative name of the directory to create. If empty, this directory's path will be used. |
Creates all directories that do not already exist in the given path.
| dirName | The relative name of the directory to create. If empty, this directory's path will be used. |
Moves a file to a new location.
| srcFile | The path of the source file to move. | |
| destFile | The new path of the file. |
| QString DzDir::path | ( | ) | const |
| void DzDir::refresh | ( | ) | const |
Refresh the directory information
Removes a file from this directory.
| fileName | The relative name of the file to remove. |
Renames a file or directory.
| oldName | The old relative name of the file/folder to rename. | |
| newName | The new relative name of the file/folder to rename. |
Removes a directory.
| dirName | The relative name of the directory to remove. If empty, this directory's path will be used. |
Removes all directories that exist in the given path.
| dirName | The relative name of the directory to remove. If empty, this directory's path will be used. |
| bool DzDir::setCurrent | ( | ) | const |
Sets the current working directory of the application to be this directory.
| void DzDir::setPath | ( | String | newPath | ) |
Sets the path of this directory