#include <Directory.h>
This description consists of a root, the directories and/or file elements.
Definition at line 604 of file Directory.h.
Public Member Functions | |
void | AppendElement (PathElement *Element) |
Appends a path element to the path. | |
void | AppendElement (const char *elementName) |
Appends a path element to the path. | |
void | AppendPath (class Path *Path) |
Appends another path's elements to the path. | |
void | AppendPath (const char *path) |
Appends another path's elements to the path. | |
Path * | Clone () |
Creates a new instance of the path with clones of the path elements. | |
bool | Contains (class Path *Path) |
Returns whether a given path is a part of this path. | |
bool | Contains (const char *path) |
Returns whether a given path is a part of this path. | |
Path * | CreateRelativePathTo (class Path *Path) |
Creates a new relative path from this path to another one. | |
Path * | CreateRelativePathTo (const char *path) |
Creates a new relative path from this path to another one. | |
Path * | CreateTargetPath (class Path *Path) |
Creates the path that results when navigation from this path to another path. | |
Path * | CreateTargetPath (const char *path) |
Creates the path that results when navigation from this path to another path. | |
void | DeleteAll () |
Deletes all path elements from the path. | |
bool | DeleteElement (PathElement *Element) |
Deletes a given path element from the path. | |
bool | DeleteElement (long nr) |
Deletes a path element at a given position. | |
bool | DeleteFirstElement () |
Deletes the first path element from the path. | |
bool | DeleteLastElement () |
Deletes the last path element from the path. | |
bool | Exists () |
Returns, if the file or directory, the path points to, exists. | |
PathElement * | GetElement (long nr) |
Returns the path element at a given position. | |
int | GetElementCount () |
Returns the number of path elements. | |
PathElement * | GetFirstElement () |
Returns the first path element. | |
PathElement * | GetLastElement () |
Returns the last path element. | |
char * | GetRoot () |
Returns the root of the path (e.g. | |
void | InsertElement (PathElement *Element, long nr) |
Inserts a path element before a given position. | |
void | InsertElement (const char *elementName, long nr) |
Inserts a path element before a given position. | |
bool | IsAbsolute () |
Returns, if the Root is not empty, so if the Path is absolute. | |
bool | IsEmpty () |
Returns, if the path elements are empty. | |
bool | IsRelative () |
Returns, if the Root is empty, so if the Path is relative. | |
bool | MakeDirectory () |
Makes a directory with the name the path points to. | |
Path (const char *path) | |
Creates a path from a string template. | |
Path () | |
Creates an empty path. | |
void | PrependElement (PathElement *Element) |
Prepends a path element to the path. | |
void | PrependElement (const char *elementName) |
Prepends a path element to the path. | |
void | PrependPath (class Path *Path) |
Prepends another path's elements to the path. | |
void | PrependPath (const char *path) |
Prepends another path's elements to the path. | |
void | SetRoot (const char *root) |
Sets the root for the path. | |
char * | ToString (bool trailingSlash) |
Creates a string representing the complete path. | |
char * | ToString () |
Creates a string representing the complete path. | |
PathElement * | UnlinkElement (PathElement *Element) |
Removes an given element from the path. | |
PathElement * | UnlinkElement (long nr) |
Removes an element at a given position. | |
PathElement * | UnlinkFirstElement () |
Removes the first element from the path. | |
PathElement * | UnlinkLastElement () |
Removes the last element from the path. | |
~Path () | |
Destroys the path. | |
Static Public Member Functions | |
Path * | CreateApplicationFolderPath () |
Creates a new instance of the path that points to the application (EXE) file's container folder. | |
Path * | CreateApplicationPath () |
Creates a new instance of the path that points to the application (EXE) file. | |
Private Attributes | |
ContainingList< PathElement > * | Elements |
The directories and/or file elements. | |
char * | Root |
The root of the file or directory. |
|
Creates an empty path.
|
|
Creates a path from a string template.
|
|
Destroys the path.
|
|
Appends a path element to the path.
|
|
Appends a path element to the path.
|
|
Appends another path's elements to the path.
|
|
Appends another path's elements to the path.
|
|
Creates a new instance of the path with clones of the path elements.
|
|
Returns whether a given path is a part of this path. That is, the roots are the same, and all the given path's elements match the first elements of this path.
|
|
Returns whether a given path is a part of this path. That is, the roots are the same, and all the given path's elements match the first elements of this path.
|
|
Creates a new instance of the path that points to the application (EXE) file's container folder.
|
|
Creates a new instance of the path that points to the application (EXE) file.
|
|
Creates a new relative path from this path to another one.
If both paths are relative, or both are absolute with the same root, the method creates a relative path from this path to the other one.
Examples:
|
|
Creates a new relative path from this path to another one.
If both paths are relative, or both are absolute with the same root, the method creates a relative path from this path to the other one.
Examples:
|
|
Creates the path that results when navigation from this path to another path.
If the other path is relative, it is appended to this path. If it is absolute, a clone of that path is returned.
|
|
Creates the path that results when navigation from this path to another path.
If the other path is relative, it is appended to this path. If it is absolute, a clone of that path is returned.
|
|
Deletes all path elements from the path. All elements are removed from the path and freed. |
|
Deletes a given path element from the path. The element is searched, removed from the path and freed.
|
|
Deletes a path element at a given position. The element is removed from the path and freed.
|
|
Deletes the first path element from the path. The element is removed from the path and freed.
|
|
Deletes the last path element from the path. The element is removed from the path and freed.
|
|
Returns, if the file or directory, the path points to, exists.
|
|
Returns the path element at a given position.
|
|
Returns the number of path elements.
|
|
Returns the first path element.
|
|
Returns the last path element.
|
|
Returns the root of the path (e.g. "C:\"). If the path is relative, this is an empty string.
|
|
Inserts a path element before a given position.
|
|
Inserts a path element before a given position.
|
|
Returns, if the Root is not empty, so if the Path is absolute.
|
|
Returns, if the path elements are empty.
|
|
Returns, if the Root is empty, so if the Path is relative.
|
|
Makes a directory with the name the path points to.
|
|
Prepends a path element to the path.
|
|
Prepends a path element to the path.
|
|
Prepends another path's elements to the path.
|
|
Prepends another path's elements to the path.
|
|
Sets the root for the path. This is for example C:\. After the root has been set, it is no longer used.
|
|
Creates a string representing the complete path.
|
|
Creates a string representing the complete path. It is not trailed by a back slash, if not required by the root.
|
|
Removes an given element from the path. The element is not freed, but returned.
|
|
Removes an element at a given position. The element is not freed, but returned.
|
|
Removes the first element from the path. The element is not freed, but returned.
|
|
Removes the last element from the path. The element is not freed, but returned.
|
|
The directories and/or file elements.
Definition at line 611 of file Directory.h. |
|
The root of the file or directory. This is for example C:\. Definition at line 624 of file Directory.h. |