MCPcopy
hub / github.com/coder/mux / readFile

Method readFile

src/node/services/streamContextBuilder.test.ts:254–261  ·  view source on GitHub ↗
(filePath: string, abortSignal?: AbortSignal)

Source from the content-addressed store, hash-verified

252 }
253
254 override readFile(filePath: string, abortSignal?: AbortSignal): ReadableStream<Uint8Array> {
255 const root = path.resolve(this.readableRoot);
256 const target = path.resolve(filePath);
257 if (target !== root && !target.startsWith(`${root}${path.sep}`)) {
258 throw new Error(`RestrictedTestRuntime cannot read outside ${root}: ${target}`);
259 }
260 return super.readFile(filePath, abortSignal);
261 }
262}
263
264describe("buildStreamSystemContext", () => {

Callers

nothing calls this directly

Calls 2

resolveMethod · 0.80
readFileMethod · 0.65

Tested by

no test coverage detected