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

Method readFile

packages/shell/src/workspace.ts:29–35  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

27 constructor(private readonly ws: WorkspaceFsLike) {}
28
29 async readFile(path: string): Promise<string> {
30 const content = await this.ws.readFile(path);
31 if (content === null) {
32 throw enoent(path);
33 }
34 return content;
35 }
36
37 async readFileBytes(path: string): Promise<Uint8Array> {
38 const bytes = await this.ws.readFileBytes(path);

Callers

nothing calls this directly

Calls 2

enoentFunction · 0.85
readFileMethod · 0.65

Tested by

no test coverage detected