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

Function readFileBytes

packages/computer/src/workspace.ts:1138–1145  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

1136 }
1137 },
1138 async readFileBytes(path) {
1139 try {
1140 return await drainBytes(await fs.readFile(path));
1141 } catch (err) {
1142 if (isEnoent(err)) return null;
1143 throw err;
1144 }
1145 },
1146 async writeFile(path, content) {
1147 await fs.writeFile(path, content);
1148 },

Callers

nothing calls this directly

Calls 3

drainBytesFunction · 0.85
isEnoentFunction · 0.70
readFileMethod · 0.65

Tested by

no test coverage detected