Functions | |
bool | isabs (const std::string &path) |
bool | isfile (const std::string &path) |
bool | isdir (const std::string &path) |
bool | islink (const std::string &path) |
bool | isexec (const std::string &path) |
std::string | getcwd () |
std::string | dirname (const std::string &path) |
std::string | basename (const std::string &path) |
std::pair< std::string, std::string > | splitext (const std::string &path) |
std::string | abspath (const std::string &path) |
std::string | realpath (const std::string &path) |
std::string | which (const std::string &cmd) |
std::string | join (const std::string &a, const std::string &b) |
void | rmtree (const std::string &path, bool ignore_errors=false) |
Contains platform-independent C++ functions for pathname manipulation.
std::string b2000::path::abspath | ( | const std::string & | path | ) |
Return a normalized absolutized version of the pathname path.
This adds the current directory if necessary and collapses redundant separators and up-level references, e.g. A//B, A/./B and A/foo/../B all become A/B.
std::string b2000::path::basename | ( | const std::string & | path | ) |
std::string b2000::path::dirname | ( | const std::string & | path | ) |
std::string b2000::path::getcwd | ( | ) |
bool b2000::path::isabs | ( | const std::string & | path | ) |
bool b2000::path::isdir | ( | const std::string & | path | ) |
bool b2000::path::isexec | ( | const std::string & | path | ) |
bool b2000::path::isfile | ( | const std::string & | path | ) |
bool b2000::path::islink | ( | const std::string & | path | ) |
std::string b2000::path::join | ( | const std::string & | a, |
const std::string & | b | ||
) |
Join two fragments to a path.
std::string b2000::path::realpath | ( | const std::string & | path | ) |
Expand all symbolic links and return the result.
void b2000::path::rmtree | ( | const std::string & | path, |
bool | ignore_errors = false |
||
) |
Remove a complete directory tree.
std::pair< std::string, std::string > b2000::path::splitext | ( | const std::string & | path | ) |
std::string b2000::path::which | ( | const std::string & | cmd | ) |
Return the full path to the first match of the given command according to the PATH environment variable.