Functions | |
std::string | GetExtension (const std::string &file_name) |
std::string | GetName (const std::string &file_name) |
std::string | GetPath (const std::string &file_name) |
void | GetDirectoriesOfFileName (const std::string &file_name, std::vector< std::string > &directories) |
void | GetDirectoriesOfPath (const std::string &path, std::vector< std::string > &directories) |
std::string | AddFileNameAndExtension (const std::string &file_name, const std::string &extension) |
std::string | AddFileNameAndPath (const std::string &file_name, const std::string &path) |
std::string | AddPaths (const std::string &path1, const std::string &path2) |
std::string | RemoveExtension (const std::string &file_name) |
std::string | Simplify (const std::string &file) |
Simplify a file path; the path will remain relative if it was relative, or absolute if it was absolute. | |
Variables | |
const char | PATH_SEPERATOR |
const char * | PATH_SEPERATOR_STRING |
std::string TC::FileName::GetExtension | ( | const std::string & | file_name | ) |
std::string TC::FileName::GetName | ( | const std::string & | file_name | ) |
std::string TC::FileName::GetPath | ( | const std::string & | file_name | ) |
void TC::FileName::GetDirectoriesOfFileName | ( | const std::string & | file_name, | |
std::vector< std::string > & | directories | |||
) |
void TC::FileName::GetDirectoriesOfPath | ( | const std::string & | path, | |
std::vector< std::string > & | directories | |||
) |
std::string TC::FileName::AddFileNameAndExtension | ( | const std::string & | file_name, | |
const std::string & | extension | |||
) |
std::string TC::FileName::AddFileNameAndPath | ( | const std::string & | file_name, | |
const std::string & | path | |||
) |
std::string TC::FileName::AddPaths | ( | const std::string & | path1, | |
const std::string & | path2 | |||
) |
std::string TC::FileName::RemoveExtension | ( | const std::string & | file_name | ) |
std::string TC::FileName::Simplify | ( | const std::string & | file | ) |
Simplify a file path; the path will remain relative if it was relative, or absolute if it was absolute.
Also, a trailing "/" will be preserved as this is important in other functions.
Examples:
/aa/bb/../cc -> /aa/cc /aa/bb/../cc/ -> /aa/cc/ /aa/bb/../.. -> / ../../bb -> ../../bb ../../bb/ -> ../../bb/ /../ -> / ./aa/bb/../../ -> ./ a/.. -> . a/../ -> ./ ./a -> ./a /////./././ -> / c:/../ -> c:/ c:a/.. -> c: /. -> /
const char TC::FileName::PATH_SEPERATOR |
const char* TC::FileName::PATH_SEPERATOR_STRING |