Private
constructorReadonly
authorityAuthority is the www.msft.com
part of http://www.msft.com/some/path?query#fragment
.
The part between the first double slashes and the next slash.
Readonly
fragmentFragment is the fragment
part of http://www.msft.com/some/path?query#fragment
.
Readonly
fsThe string representing the corresponding file system path of this Uri.
Will handle UNC paths and normalize windows drive letters to lower-case. Also uses the platform specific path separator. Will not validate the path for invalid characters and semantics. Will not look at the scheme of this Uri.
Readonly
pathPath is the /some/path
part of http://www.msft.com/some/path?query#fragment
.
Readonly
queryQuery is the query
part of http://www.msft.com/some/path?query#fragment
.
Readonly
schemeScheme is the http
part of http://www.msft.com/some/path?query#fragment
.
The part before the first colon.
Returns a string representation of this Uri. The representation and normalization of a URI depends on the scheme. The resulting string can be safely used with Uri.parse.
Optional
skipEncoding: booleanDo not percentage-encode the result, defaults to false
. Note that
the #
and ?
characters occurring in the path will always be encoded.
A string representation of this Uri.
Derive a new Uri from this Uri.
let file = Uri.parse('before:some/file/path');
let other = file.with({ scheme: 'after' });
assert.ok(other.toString() === 'after:some/file/path');
An object that describes a change to this Uri. To unset components use null
or
the empty string.
Optional
authority?: stringOptional
fragment?: stringOptional
path?: stringOptional
query?: stringOptional
scheme?: stringA new Uri that reflects the given change. Will return this
Uri if the change
is not changing anything.
Static
fileStatic
fromCreate an URI from its component parts
The component parts of an Uri.
Optional
Readonly
authority?: stringOptional
Readonly
fragment?: stringOptional
Readonly
path?: stringOptional
Readonly
query?: stringReadonly
scheme: stringA new Uri instance.
Static
joinCreate a new uri which path is the result of joining the path of the base uri with the provided path segments.
joinPath
only affects the path component
and all other components (scheme, authority, query, and fragment) are
left as they are.The path segments are normalized in the following ways:
/
or \
) are replaced with a single separatorfile
-uris on windows, the backslash-character (``) is considered a path-separator..
-segment denotes the parent segment, the .
denotes the current segmentjoinPath(Uri.file('file:///c:/root'), '../../other').fsPath === 'c:/other'
Rest
...pathSegments: string[]One more more path fragments
A new uri which path is joined with the given fragments
Static
parse
A universal resource identifier representing either a file on disk or another resource, like untitled resources.