MCPcopy Create free account
hub / github.com/CreminiAI/skillpack / resolveDownloadFilePath

Function resolveDownloadFilePath

src/runtime/adapters/web.ts:64–73  ·  view source on GitHub ↗
(
  rootDir: string,
  filePath: string,
)

Source from the content-addressed store, hash-verified

62}
63
64function resolveDownloadFilePath(
65 rootDir: string,
66 filePath: string,
67): string | null {
68 const resolvedPath = path.isAbsolute(filePath)
69 ? path.resolve(filePath)
70 : path.resolve(rootDir, filePath);
71
72 return isWithinDirectory(rootDir, resolvedPath) ? resolvedPath : null;
73}
74
75// ---------------------------------------------------------------------------
76// WebAdapter

Callers 1

startMethod · 0.85

Calls 1

isWithinDirectoryFunction · 0.85

Tested by

no test coverage detected