src/vs/platform/uriIdentity/common/uriIdentity.ts
46 LOC · 46 covered · 0 uncovered · 1 ranges · 3449 concepts · 1 introducers · 1961 tests
File neighbourhood
The centred file is linked to every concept that introduces one of its ranges, every test that runs code from the file, and the gray connector concepts standing between those tests and the file's own introducer concepts. Undirected links join concepts to every file where they introduce source and concepts to the tests they introduce; arrows show specialization between the displayed concepts and bridge only concepts omitted from this view. Concept colors match the source ranges below; connector concepts have no source color and are shown in gray.
Focused file, its introducer and connector concepts, their introduced files, and tests that run code from the file
In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the related-file, concept, and source links on this page.
Graph controls are ready.
Interactive rendering requires JavaScript and WebGL. Use the related-file, concept, and source links on this page while the interactive map is unavailable.
/*---------------------------------------------------------------------------------------------
uriIdentity.ts ×1
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { URI } from '../../../base/common/uri.js';
import { createDecorator } from '../../instantiation/common/instantiation.js';
import { IExtUri } from '../../../base/common/resources.js';
export const IUriIdentityService = createDecorator<IUriIdentityService>('IUriIdentityService');
export interface IUriIdentityService {
readonly _serviceBrand: undefined;
/**
* Uri extensions that are aware of casing.
*/
readonly extUri: IExtUri;
/**
* Returns a canonical uri for the given resource. Different uris can point to the same
* resource. That's because of casing or missing normalization, e.g the following uris
* are different but refer to the same document (because windows paths are not case-sensitive)
*
* ```txt
* file:///c:/foo/bar.txt
* file:///c:/FOO/BAR.txt
* ```
*
* This function should be invoked when feeding uris into the system that represent the truth,
* e.g document uris or marker-to-document associations etc. This function should NOT be called
* to pretty print a label nor to sanitize a uri.
*
* Samples:
*
* | in | out | |
* |---|---|---|
* | `file:///foo/bar/../bar` | `file:///foo/bar` | n/a |
* | `file:///foo/bar/../bar#frag` | `file:///foo/bar#frag` | keep fragment |
* | `file:///foo/BAR` | `file:///foo/bar` | assume ignore case |
* | `file:///foo/bar/../BAR?q=2` | `file:///foo/BAR?q=2` | query makes it a different document |
*/
asCanonicalUri(uri: URI): URI;
}