mrdocs::files::looksLikeDirectory
Determine whether a path looks like a directory.
Synopsis
Declared in <mrdocs/Support/Filesystem/Path.hpp>
bool
looksLikeDirectory(std::string_view pathName);
Description
When the path exists, this reports whether it is a directory. When it does not exist yet, it falls back to a lexical hint: the path looks like a directory when its last segment has no extension (contains no period), and like a file otherwise.
This is useful for output paths, which often do not exist when a generator is deciding whether to treat the path as a file or a directory.
Return Value
true if the path exists and is a directory, or does not exist and its last segment contains no period; false otherwise.
Parameters
Name |
Description |
pathName |
The absolute or relative path |
Created with MrDocs