MCPcopy Index your code
hub / github.com/microsoft/vscode-js-debug / absolutePathToFileUrlWithDetection

Function absolutePathToFileUrlWithDetection

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

Source from the content-addressed store, hash-verified

332 * different from {@link absolutePathToFileUrl}, but should be more correct.
333 */
334export function absolutePathToFileUrlWithDetection(absolutePath: string): string {
335 if (!absolutePath.startsWith('/')) {
336 return 'file:///' + platformPathToUrlPath(absolutePath);
337 }
338 return 'file://' + platformPathToUrlPath(absolutePath);
339}
340
341/**
342 * Returns whether the path is a Windows or posix path.

Callers 2

breakpointsTest.tsFile · 0.90
baseURLFunction · 0.90

Calls 1

platformPathToUrlPathFunction · 0.85

Tested by

no test coverage detected