mrdocs::files::getParentDir

Return the parent directory.

Synopsis

std::string_view
getParentDir(std::string_view pathName);

Description

The result is a view into pathName (like getFileName), so it is valid only while pathName is. Wrap it in a std::string to keep it.

Return Value

The parent directory, or the empty string if there is none.

Parameters

Name

Description

pathName

The absolute or relative path to the directory or file.

Created with MrDocs