The raw should be normalized, meaning that only '/' is allowed as a path separator.
Returns the parent directory if it exists (hasDir === true
) or this
otherwise.
Returns true
if this has a parent directory, false
otherwise.
This implementation returns true
if and only if this is not the root dir and
there is a path separator in the raw path.
vscode-uri always normalizes drive letters to lower case: https://github.com/Microsoft/vscode-uri/blob/b1d3221579f97f28a839b6f996d76fc45e9964d8/src/index.ts#L1025 Theia path should be adjusted to this.
Normalize path separator to use Path.separator
Normalized string path
Tildify path, replacing home
with ~
if user's home
is present at the beginning of the path.
This is a non-operation for Windows.
Untildify path, replacing ~
with home
if ~
present at the beginning of the path.
This is a non-operation for Windows.
On POSIX: ┌──────────────────────┬────────────┐ │ dir │ base │ ├──────┬ ├──────┬─────┤ │ root │ │ name │ ext │ " / home/user/dir / file .txt " └──────┴───────────────┴──────┴─────┘
On Windows: ┌──────────────────────┬────────────┐ │ dir │ base │ ├──────┬ ├──────┬─────┤ │ root │ │ name │ ext │ " /c: / home/user/dir / file .txt " └──────┴───────────────┴──────┴─────┘