MCPcopy
hub / github.com/microsoft/vscode-js-debug / absolutePathToFileUrl

Function absolutePathToFileUrl

src/common/urlUtils.ts:322–327  ·  view source on GitHub ↗
(absolutePath: string)

Source from the content-addressed store, hash-verified

320// TODO: this does not escape/unescape special characters
321/** @deprecated consider absolutePathToFileUrlWithDetection instead */
322export function absolutePathToFileUrl(absolutePath: string): string {
323 if (platform === 'win32') {
324 return 'file:///' + platformPathToUrlPath(absolutePath);
325 }
326 return 'file://' + platformPathToUrlPath(absolutePath);
327}
328
329/**
330 * Absolte path former that detects the platform based on the absolutePath

Callers 10

finishLaunchFunction · 0.90
scriptUrlToUrlMethod · 0.90
scriptUrlToUrlMethod · 0.90
createLifecycleMethod · 0.90
urlUtils.test.tsFile · 0.90
createMetadataForFileFunction · 0.90
_setByPathFunction · 0.90

Calls 1

platformPathToUrlPathFunction · 0.85

Tested by

no test coverage detected