A helper class with path-related utilities. More...
|static csPathsList||ExpandAll (const csPathsList &paths)|
|Expands all paths in a path list. |
|static char *||ExpandPath (const char *path)|
|Expand a native path relative to the current directory. |
|static void||FilterInvalid (csPathsList &paths)|
|Filter all non-existent items out of a paths list. |
|static csPathsList||LocateFile (const csPathsList &paths, const char *file, bool thorough=false)|
|Determine which path(s) of a given set contains a given file. |
|static bool||PathsIdentical (const char *path1, const char *path2)|
|Check whether two native paths actually point to the same location. |
A helper class with path-related utilities.
Member Function Documentation
Expands all paths in a path list.
|static char* csPathsUtilities::ExpandPath||(||const char *||path||)||
Expand a native path relative to the current directory.
- The specified path must refer to a directory, rather than a file.
- Caller is responsible to free the returned string with delete after using it.
|static void csPathsUtilities::FilterInvalid||(||csPathsList &||paths||)||
Filter all non-existent items out of a paths list.
|static csPathsList csPathsUtilities::LocateFile||(||const csPathsList &||paths,|
|const char *||file,|
|bool|| thorough = |
Determine which path(s) of a given set contains a given file.
paths List of (native) paths to check. file Filename to search. thorough Whether all paths should be checked. If
false, at most only a single path, the first containing the file, is returned.
|static bool csPathsUtilities::PathsIdentical||(||const char *||path1,|
|const char *||path2|
Check whether two native paths actually point to the same location.
Use this instead of strcmp() or the like, as it may not suffice in all cases (e.g. on Windows paths names are case-insensitive, but on Unix they aren't).
- Expects the paths to be fully qualified. Use csExpandPath() to ensure this.
The documentation for this class was generated from the following file:
Generated for Crystal Space 1.4.1 by doxygen 1.7.1