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

Function readFile

src/commands/init.test.ts:93–97  ·  view source on GitHub ↗
(p: string)

Source from the content-addressed store, hash-verified

91 return null;
92 },
93 async readFile(p: string) {
94 const v = store.get(p);
95 if (v === undefined) throw Object.assign(new Error(`ENOENT: ${p}`), { code: 'ENOENT' });
96 return v;
97 },
98 async writeFile(p: string, data: string, opts?: { exclusive?: boolean }) {
99 if (opts?.exclusive && (store.has(p) || dirs.has(p))) {
100 throw Object.assign(new Error(`EEXIST: ${p}`), { code: 'EEXIST' });

Callers

nothing calls this directly

Calls 1

getMethod · 0.65

Tested by

no test coverage detected