ChimeraTK-DeviceAccess
03.18.00
|
Functions | |
std::string | getCurrentWorkingDirectory () |
Returns absolute path to current working directory. The returned path ends with a forward slash. More... | |
std::string | convertToAbsolutePath (std::string const &relativePath) |
Converts a relative path to its absolute path. More... | |
std::string | extractDirectory (std::string const &path) |
Returns the path to the directory containing the file provided as the input parameter. More... | |
std::string | extractFileName (std::string const &path) |
Extract the string after the last '/' in a path. Returned substring does not include the '/' character. More... | |
std::string | concatenatePaths (const std::string &path1, const std::string &path2) |
Concatenates two given paths using custom rules. More... | |
std::string ChimeraTK::parserUtilities::concatenatePaths | ( | const std::string & | path1, |
const std::string & | path2 | ||
) |
Concatenates two given paths using custom rules.
Method returns path2 when input parameter path2 is an absolute path. Otherwise path1 is concatenated with path2 and returned.
path1 | Path to a directory |
path2 | Path to file/directory. |
Definition at line 27 of file parserUtilities.cc.
std::string ChimeraTK::parserUtilities::convertToAbsolutePath | ( | std::string const & | relativePath | ) |
Converts a relative path to its absolute path.
Method converts a path relative to the programs current working directory to an absolute path. Providing an absolute path as parameter, still returns the absolute path.
relativePath | Path to a file/directory relative to the programs current working directory. |
Definition at line 23 of file parserUtilities.cc.
std::string ChimeraTK::parserUtilities::extractDirectory | ( | std::string const & | path | ) |
Returns the path to the directory containing the file provided as the input parameter.
path | Path to a file. |
Definition at line 35 of file parserUtilities.cc.
std::string ChimeraTK::parserUtilities::extractFileName | ( | std::string const & | path | ) |
Extract the string after the last '/' in a path. Returned substring does not include the '/' character.
path | String representing file path. |
Definition at line 48 of file parserUtilities.cc.
std::string ChimeraTK::parserUtilities::getCurrentWorkingDirectory | ( | ) |
Returns absolute path to current working directory. The returned path ends with a forward slash.
Definition at line 19 of file parserUtilities.cc.