MCPcopy Create free account
hub / github.com/cloudflare/computer / checkPath

Function checkPath

packages/computer/src/mounts/index.ts:190–194  ·  view source on GitHub ↗
(absPath: string)

Source from the content-addressed store, hash-verified

188 let entriesWritten = 0;
189
190 function checkPath(absPath: string): void {
191 if (!absPath.startsWith(`${root}/`) && absPath !== root) {
192 throw new Error(`mount ${root}: writeFile/mkdir target ${absPath} is outside the mount root`);
193 }
194 }
195
196 return {
197 root,

Callers 2

writeFileFunction · 0.85
mkdirFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected