File functions namespace. More...
Functions | |
| bool | RealPath (const std::string &path, std::string &resolvedpath) |
| Extracts the real path of a given file. | |
| void | DirBaseSplit (const std::string &path, std::string &dir, std::string &base) |
| Splits the given path into the dir and base components. | |
| bool | ChdirGetcwd (const std::string &dir, std::string &path) |
| Gets the real path of a directory using the chdir and getcwd function. | |
File functions namespace.
| bool VR3File::ChdirGetcwd | ( | const std::string & | dir, |
| std::string & | path | ||
| ) |
Gets the real path of a directory using the chdir and getcwd function.
This function extracts the absolute path of a directory. The directory is specified with the dir parameter (relative or absolute path). Using the chdir() and getcwd() functions the desired directory absolute path is stored in path.
| [in] | dir | The directory input path |
| [out] | path | The directory absolute path |
| void VR3File::DirBaseSplit | ( | const std::string & | path, |
| std::string & | dir, | ||
| std::string & | base | ||
| ) |
Splits the given path into the dir and base components.
This function parses the given path string and splits it in two parts:
| [in] | path | The given path |
| [out] | dir | The dir part of the path |
| [out] | base | The base part of the path |
| bool VR3File::RealPath | ( | const std::string & | path, |
| std::string & | resolvedpath | ||
| ) |
Extracts the real path of a given file.
This function is used to obtain the absolute path of a given file using only its (maybe relative) user-provided path. The function implementation structure is the same on windows and linux, but we use different (even if equivalent) functions:
| [in] | path | The user-provided file path |
| [out] | resolvedpath | The resulting absolute path |
1.7.2