Holds the various parsed components of a path. More...
#include <Path.h>
Public Member Functions | |
bool | parseWindows (StringView input) |
Parses all components on windows input path. More... | |
bool | parsePosix (StringView input) |
Parses all components on posix input path. More... | |
Public Attributes | |
bool | endsWithSeparator = false |
Type | type = AsPosix |
Indicates if this is a windows or posix path. More... | |
StringView | root |
Ex. "C:\\" on windows - "/" on posix. More... | |
StringView | directory |
Ex. "C:\\dir" on windows - "/dir" on posix. More... | |
StringView | base |
Ex. "base" for "C:\\dir\\base" on windows or "/dir/base" on posix. More... | |
StringView | name |
Ex. "name" for "C:\\dir\\name.ext" on windows or "/dir/name.ext" on posix. More... | |
StringView | ext |
Ex. "ext" for "C:\\dir\\name.ext" on windows or "/dir/name.ext" on posix. More... | |
Holds the various parsed components of a path.
bool SC::Path::ParsedView::parsePosix | ( | StringView | input | ) |
Parses all components on posix input path.
For example:
input | A path in posix form (ex "/directory/name.ext") |
bool SC::Path::ParsedView::parseWindows | ( | StringView | input | ) |
Parses all components on windows input path.
For example:
input | A path in windows form (ex "C:\\directory\name.ext") |
StringView SC::Path::ParsedView::base |
Ex. "base"
for "C:\\dir\\base"
on windows or "/dir/base"
on posix.
StringView SC::Path::ParsedView::directory |
Ex. "C:\\dir"
on windows - "/dir"
on posix.
StringView SC::Path::ParsedView::ext |
Ex. "ext"
for "C:\\dir\\name.ext"
on windows or "/dir/name.ext"
on posix.
StringView SC::Path::ParsedView::name |
Ex. "name"
for "C:\\dir\\name.ext"
on windows or "/dir/name.ext"
on posix.
StringView SC::Path::ParsedView::root |
Ex. "C:\\"
on windows - "/"
on posix.
Type SC::Path::ParsedView::type = AsPosix |
Indicates if this is a windows or posix path.