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

Function pathToFileUrl

examples/pdf-server/server.ts:554–557  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

552}
553
554export function pathToFileUrl(filePath: string): string {
555 const absolutePath = path.resolve(filePath);
556 return `file://${encodeURIComponent(absolutePath).replace(/%2F/g, "/")}`;
557}
558
559/**
560 * Check if `dir` is an ancestor of `filePath` using path.relative,

Callers 3

server.test.tsFile · 0.90
parseArgsFunction · 0.85
addLocalFunction · 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…