MCPcopy Create free account
hub / github.com/Snapchat/Valdi / absolutePathToFileUrl

Function absolutePathToFileUrl

valdi/vscode_debugger/src/common/urlUtils.ts:246–251  ·  view source on GitHub ↗
(absolutePath: string)

Source from the content-addressed store, hash-verified

244
245// TODO: this does not escape/unescape special characters, but it should.
246export function absolutePathToFileUrl(absolutePath: string): string {
247 if (process.platform === 'win32') {
248 return 'file:///' + platformPathToUrlPath(absolutePath);
249 }
250 return 'file://' + platformPathToUrlPath(absolutePath);
251}
252
253/**
254 * Returns whether the path is a Windows or posix path.

Callers 8

finishLaunchFunction · 0.90
scriptUrlToUrlMethod · 0.90
createLifecycleMethod · 0.90
scriptUrlToUrlMethod · 0.90
createLifecycleMethod · 0.90
createMetadataForFileFunction · 0.90
_setByPathFunction · 0.90

Calls 1

platformPathToUrlPathFunction · 0.85

Tested by

no test coverage detected