1 | import { URI as Uri } from 'vscode-uri';
|
2 | import { Path } from './path';
|
3 | export declare class URI {
|
4 | static fromComponents(components: UriComponents): URI;
|
5 | static fromFilePath(path: string): URI;
|
6 | private readonly codeUri;
|
7 | private _path;
|
8 | constructor(uri?: string | Uri);
|
9 | /**
|
10 | * TODO move implementation to `DefaultUriLabelProviderContribution.getName`
|
11 | *
|
12 | * @deprecated use `LabelProvider.getName` instead
|
13 | */
|
14 | get displayName(): string;
|
15 | /**
|
16 | * Return all uri from the current to the top most.
|
17 | */
|
18 | get allLocations(): URI[];
|
19 | get parent(): URI;
|
20 | relative(uri: URI): Path | undefined;
|
21 | resolve(path: string | Path): URI;
|
22 | /**
|
23 | * @returns a new, absolute URI if one can be computed from the path segments passed in.
|
24 | */
|
25 | resolveToAbsolute(...pathSegments: Array<string | Path>): URI | undefined;
|
26 | /**
|
27 | * return a new URI replacing the current with the given scheme
|
28 | */
|
29 | withScheme(scheme: string): URI;
|
30 | /**
|
31 | * return a new URI replacing the current with the given authority
|
32 | */
|
33 | withAuthority(authority: string): URI;
|
34 | /**
|
35 | * return this URI without a authority
|
36 | */
|
37 | withoutAuthority(): URI;
|
38 | /**
|
39 | * return a new URI replacing the current with the given path
|
40 | */
|
41 | withPath(path: string | Path): URI;
|
42 | /**
|
43 | * return this URI without a path
|
44 | */
|
45 | withoutPath(): URI;
|
46 | /**
|
47 | * return a new URI replacing the current with the given query
|
48 | */
|
49 | withQuery(query: string): URI;
|
50 | /**
|
51 | * return this URI without a query
|
52 | */
|
53 | withoutQuery(): URI;
|
54 | /**
|
55 | * return a new URI replacing the current with the given fragment
|
56 | */
|
57 | withFragment(fragment: string): URI;
|
58 | /**
|
59 | * return this URI without a fragment
|
60 | */
|
61 | withoutFragment(): URI;
|
62 | /**
|
63 | * return a new URI replacing the current with its normalized path, resolving '..' and '.' segments
|
64 | */
|
65 | normalizePath(): URI;
|
66 | get scheme(): string;
|
67 | get authority(): string;
|
68 | get path(): Path;
|
69 | get query(): string;
|
70 | get fragment(): string;
|
71 | toString(skipEncoding?: boolean): string;
|
72 | isEqual(uri: URI, caseSensitive?: boolean): boolean;
|
73 | isEqualOrParent(uri: URI, caseSensitive?: boolean): boolean;
|
74 | static getDistinctParents(uris: URI[]): URI[];
|
75 | private hasSameOrigin;
|
76 | toComponents(): UriComponents;
|
77 | }
|
78 | export interface UriComponents {
|
79 | scheme: string;
|
80 | authority: string;
|
81 | path: string;
|
82 | query: string;
|
83 | fragment: string;
|
84 | external?: string;
|
85 | }
|
86 | export default URI;
|
87 |
|
\ | No newline at end of file |