@difizen/mana-common
Version:
56 lines • 1.9 kB
TypeScript
import { Path } from './path';
import { URI as Uri } from './vscode-uri/uri';
export declare class URI {
private readonly codeUri;
private _path;
constructor(uri?: string | Uri, options?: {
simpleMode: boolean;
});
get parent(): URI;
relative(uri: URI): Path | undefined;
/**
* return a new URI replacing the current with its normalized path, resolving '..' and '.' segments
*/
normalizePath(): URI;
get displayName(): string;
get scheme(): string;
get authority(): string;
get path(): Path;
get query(): string;
get fragment(): string;
toString(skipEncoding?: boolean): string;
toJSON(): any;
equals(uri: URI, caseSensitive?: boolean): boolean;
includes(uri: URI, caseSensitive?: boolean): boolean;
sameOrigin(uri: URI): boolean;
static resolve(uri: URI, path: string | Path): URI;
/**
* return a new URI replacing the current with the given scheme
*/
static withScheme(uri: URI, scheme: string): URI;
/**
* return a new URI replacing the current with the given authority
*/
static withAuthority(uri: URI, authority?: string): URI;
/**
* return a new URI replacing the current with the given path
*/
static withPath(uri: URI, path?: string | Path): URI;
/**
* return a new URI replacing the current with the given query
*/
static withQuery(uri: URI, query?: string): URI;
/**
* return a new URI replacing the current with the given fragment
*/
static withFragment(uri: URI, fragment?: string): URI;
static sameOrigin(uriA: URI, uriB: URI): boolean;
static isEqualOrParent(uriA: URI, uriB: URI, caseSensitive?: boolean): boolean;
getParsedQuery(): {
[]: string;
};
static stringifyQuery(query: {
[key: string]: any;
}): string;
}
//# sourceMappingURL=uri.d.ts.map