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