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

Function readFile

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

Source from the content-addressed store, hash-verified

1128): ThinkWorkspaceCompatibility {
1129 return {
1130 async readFile(path) {
1131 try {
1132 return await fs.readFile(path, "utf8");
1133 } catch (err) {
1134 if (isEnoent(err)) return null;
1135 throw err;
1136 }
1137 },
1138 async readFileBytes(path) {
1139 try {
1140 return await drainBytes(await fs.readFile(path));

Callers

nothing calls this directly

Calls 2

isEnoentFunction · 0.70
readFileMethod · 0.65

Tested by

no test coverage detected