Return the parent directory.
Declared in <mrdocs/Support/Filesystem/Path.hpp>
std::string
getParentDir(
std::string_view pathName,
unsigned int levels);
If the parent directory is defined, the returned path will always have a trailing separator.
The parent directory, or the empty string if there is none.
| Name | Description |
|---|---|
| pathName | The absolute or relative path to the directory or file. |
| levels | The number of levels to go up. If this is zero, the original path is returned. If this is greater than the number of levels in the path, the empty string is returned. |