MCPcopy Create free account
hub / github.com/TestSprite/testsprite-cli / readFile

Function readFile

src/commands/agent.test.ts:53–57  ·  view source on GitHub ↗
(p: string)

Source from the content-addressed store, hash-verified

51 return null;
52 },
53 async readFile(p: string) {
54 const v = store.get(p);
55 if (v === undefined) throw Object.assign(new Error(`ENOENT: ${p}`), { code: 'ENOENT' });
56 return v;
57 },
58 async writeFile(p: string, data: string, opts?: { exclusive?: boolean }) {
59 if (opts?.exclusive && (store.has(p) || dirs.has(p) || symlinks.has(p))) {
60 throw Object.assign(new Error(`EEXIST: ${p}`), { code: 'EEXIST' });

Callers

nothing calls this directly

Calls 2

readFileMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected