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

Function platformPathToUrlPath

valdi/vscode_debugger/src/common/urlUtils.ts:378–385  ·  view source on GitHub ↗
(p: string)

Source from the content-addressed store, hash-verified

376}
377
378export function platformPathToUrlPath(p: string): string {
379 p = platformPathToPreferredCase(p);
380 if (process.platform === 'win32') {
381 p = p.replace(/\\/g, '/');
382 }
383
384 return encodeURI(p);
385}
386
387export function platformPathToPreferredCase(p: string): string;
388export function platformPathToPreferredCase(p: string | undefined): string | undefined;

Callers 1

absolutePathToFileUrlFunction · 0.85

Calls 2

replaceMethod · 0.65

Tested by

no test coverage detected