#include <Directory.h>
The directory class implements methods to access the system directory
Enumeration type for folder locations
| TDirectory::TDirectory | ( | ) |
Creates an Directory wrapper object
| TDirectory::TDirectory | ( | const TString & | strDirName ) |
Creates an new Directory wrapper object
| strDirName | : Name of the directory |
| TDirectory::TDirectory | ( | const TDirectoryItem & | rItem ) |
Creates an new Directory wrapper object out of the directory item
| rItem | : Item containing the path information |
| TDirectory::TDirectory | ( | const TDirectory & | rDirectory ) |
Copy constructor
| rDirectory | : Directory to copy |
| TDirectory::~TDirectory | ( | ) | [virtual] |
Destroys the Directory wrapper object
| bool TDirectory::equals | ( | const TDirectory & | rDirectory ) | const |
This checks if a directory equals an other directory object. Only the names and not the content are compared.
| rDirectory | : Object to check |
| true | : Object is equal |
| false,: | Object is not equal |
| bool TDirectory::equals | ( | const IString & | rDirectoryName ) | const |
This checks if a directory equals an other directory object.
| bool TDirectory::exists | ( | ) | const |
Checks if the file exists
| true | : File exists |
| false | : File doesnt exist |
| static TDirectory zeus::TDirectory::getCurrentDirectory | ( | bool & | rError ) | [inline, static] |
| Retval zeus::TDirectory::getDirectoryContent | ( | IList< TDirectoryItem > & | rList, |
| bool | bRecursive | ||
| ) | const [inline] |
Returns a list of directory items from this directory
| rList | [OUT]: List of directory items. |
| bRecursive | [IN] : List recursively. |
| Retval TDirectory::getDirectoryContent | ( | IList< TDirectoryItem > & | rList, |
| const TFilter & | rFilter, | ||
| bool | bRecursive | ||
| ) | const |
Returns a list of directory items from this directory
| rList | : List of items to return. Each item of this list must be released by the caller |
| rFilter | : Filter if the searching |
| bRecursive | [IN] : List recursively. |
| RET_NOERROR | : List returned |
| RET_REQUEST_FAILED | : Could not read this directory |
| Int zeus::TDirectory::getDirectoryContentCount | ( | bool | bRecursive ) | const [inline] |
Returns the number of directory items from this directory
| bRecursive | [IN] : List recursively. |
| Int TDirectory::getDirectoryContentCount | ( | const TFilter & | rFilter, |
| bool | bRecursive | ||
| ) | const |
Returns the number of directory entires
| rFilter | : Filter if the searching |
| bRecursive | [IN] : List recursively. |
| const TString & zeus::TDirectory::getDirName | ( | ) | const [inline] |
Returns the absolute name of the directory
| TDirectory TDirectory::getSystemDirectory | ( | EFolderType | eFolder, |
| bool & | rError | ||
| ) | [static] |
This method returns the directory instance of a system directory.
| eFolder | : Folder type (see enumeration) |
| rError | : returns true if an error occured |
| Retval TDirectory::getSystemDirName | ( | EFolderType | eFolder, |
| TString & | rDirName | ||
| ) | [static] |
This method returns the name of a system directory.
| eFolder | : Folder type (see enumeration) |
| rDirName | : Return parameter of the system directory |
| RET_NOERROR | : System directory name returned |
| RET_REQUEST_FAILED | : Could not find system directory |
| TDirectory TDirectory::getTempDirectory | ( | bool & | rError ) | [static] |
This method returns the temporary file directory of a system
| rError | : returns true if an error occured |
| TDirectory TDirectory::getUserDirectory | ( | bool & | rError ) | [static] |
This method returns the home directory of a user. For Unix systems it will simply return the '~'. For windows systems the absolute home directory of the current user will be returned
| rError | : returns true if an error occured |
| TDirectory TDirectory::getWorkingDirectory | ( | bool & | rError ) | [static] |
Static method to receive the current working directory
| bool zeus::TDirectory::isAbsolute | ( | ) | const [inline] |
Checks if the directory is a absolute or a relative path
| true,: | path is absolute |
| false,: | path is relative |
| bool zeus::TDirectory::isEmpty | ( | ) | const [inline] |
Checks if a directory is empty
| Retval TDirectory::makeAbsolute | ( | const TString & | strBasePath, |
| bool | bMustExists | ||
| ) |
This builds an abolute path if a path is not absolute yet. The base path will be assembled with this path.
| strBasePath | : base path (must be absolute) |
| bMustExists | : if the assembled path does not exists, the method will return an error. |
| bool TDirectory::makeDirectory | ( | bool | bCreateDeep = false ) |
If a directory does not exists this method will create a new directory. If the directory exists it will simply return true.
| bCreateDeep | : Creates non existing parent directories if flag is set |
| true | : Directory created |
| false | : could not create directory |
| bool zeus::TDirectory::operator!= | ( | const TDirectory & | rDirectory ) | const [inline] |
Checks if two directories are equal
| bool zeus::TDirectory::operator!= | ( | const TString & | rDirectory ) | const [inline] |
Checks if two directories are equal
| TDirectory & TDirectory::operator= | ( | const TDirectory & | rDirectory ) |
Copy operator
| rDirectory | : Directory to copy |
| bool zeus::TDirectory::operator== | ( | const TDirectory & | rDirectory ) | const [inline] |
Checks if two directories are equal
| bool zeus::TDirectory::operator== | ( | const TString & | rDirectory ) | const [inline] |
Checks if two directories are equal
| bool TDirectory::removeDirectory | ( | bool | bForce = false ) |
If a directory exists this method will remove it. If the directory doesnt exists it will simply return true.
| bForce | : if a directory is not empty it is only deleted if the bForced-flag is set |
| true | : Directory created |
| false | : could not create directory |
rItem.isDirectory()
| bool TDirectory::rename | ( | const TString & | strNewName ) |
This method renames a directory. It will fail if the new directory exists or if the name is already given to this directory or this does not exists.
| true | : Directory renamed |
| false | : could not rename directory |
| static Retval zeus::TDirectory::setCurrentDirectory | ( | const IString & | strDirectory ) | [inline, static] |
| bool zeus::TDirectory::setFilesReadOnly | ( | const IString & | strDirectory, |
| bool | bValue, | ||
| bool | bRecursive | ||
| ) | [inline, static] |
sets the readonly flag to all files of a given folder.
| strDirectory | : Name of the folder |
| bValue | : readonly flag. True = read only |
| bRecursive | : Flag if all file recursivly (including subfolders) are affected of the change |
| true | : flags set |
| false | : invalid folder |
| bool TDirectory::setFilesReadOnly | ( | bool | bValue, |
| bool | bRecursive | ||
| ) |
sets the readonly flag to all files of a given folder.
| bValue | : readonly flag. True = read only |
| bRecursive | : Flag if all file recursivly (including subfolders) are affected of the change |
| true | : flags set |
| false | : invalid folder |
| Retval TDirectory::setWorkingDirectory | ( | const IString & | strDirectory ) | [static] |
Static method to set the current working directory.
| void zeus::TDirectory::simplifyPathName | ( | bool * | pbError = NULL ) |
[inline] |
simplifies the path name
| TString TDirectory::simplifyPathName | ( | const IString & | rstrPathName, |
| bool * | pbError = NULL |
||
| ) | [static] |
simplifies the path name. Elements such as ..\ are removed
| TString zeus::TDirectory::toString | ( | ) | const [inline] |
Reimplemented from zeus::TZObject.