MCPcopy Index your code
hub / github.com/angular/angular / uriToFilePath

Function uriToFilePath

vscode-ng-language-service/server/src/utils.ts:23–32  ·  view source on GitHub ↗
(uri: string)

Source from the content-addressed store, hash-verified

21 * @param uri
22 */
23export function uriToFilePath(uri: string): string {
24 // Note: uri.path is different from uri.fsPath
25 // See
26 // https://github.com/microsoft/vscode-uri/blob/413805221cc6ed167186ab3103d3248d6f7161f2/src/index.ts#L622-L645
27 const {scheme, fsPath} = URI.parse(uri);
28 if (scheme !== Scheme.File) {
29 return '';
30 }
31 return fsPath;
32}
33
34/**
35 * Converts the specified `filePath` to a proper URI.

Callers 10

onDidOpenTextDocumentMethod · 0.90
onDidSaveTextDocumentMethod · 0.90
getLSAndScriptInfoMethod · 0.90
onCodeActionFunction · 0.90
onCodeActionResolveFunction · 0.90
onDidChangeWatchedFilesFunction · 0.90
isInAngularProjectFunction · 0.90
utils_spec.tsFile · 0.90

Calls 1

parseMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…