MCPcopy Create free account
hub / github.com/modelcontextprotocol/ext-apps / fileUrlToPath

Function fileUrlToPath

examples/pdf-server/server.ts:549–552  ·  view source on GitHub ↗
(fileUrl: string)

Source from the content-addressed store, hash-verified

547}
548
549export function fileUrlToPath(fileUrl: string): string {
550 // Support both file:// and computer:// (used by some clients for local files)
551 return decodeURIComponent(fileUrl.replace(/^(?:file|computer):\/\//, ""));
552}
553
554export function pathToFileUrl(filePath: string): string {
555 const absolutePath = path.resolve(filePath);

Callers 7

mainFunction · 0.85
validateUrlFunction · 0.85
readPdfRangeFunction · 0.85
refreshRootsFunction · 0.85
createServerFunction · 0.85
resolveImageAnnotationFunction · 0.85
processInteractCommandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…