Mana
|
Functions | |
std::string_view | path (std::string_view fullFilePath) |
Returns the path without the file name. | |
std::string | joinPaths (std::string_view path1, std::string_view path2) |
Join two path elements into one. | |
std::string | cleanPath (const std::string &path) |
Removes relative elements from the path. | |
std::string utils::cleanPath | ( | const std::string & | path | ) |
std::string utils::joinPaths | ( | std::string_view | path1, |
std::string_view | path2 | ||
) |
Join two path elements into one.
This function helps handling relative paths.
Examples:
/foo + bar = /foo/bar /foo/ + bar = /foo/bar /foo + /bar = /bar
This will work for PhysFS paths. Windows style paths (prefixed with drive letters) won't work.