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

Method readFile

packages/shell/src/fs/in-memory-fs.ts:212–217  ·  view source on GitHub ↗
(
    path: string,
    options?: ReadFileOptions | BufferEncoding
  )

Source from the content-addressed store, hash-verified

210 // ── FileSystem interface ───────────────────────────────────────────
211
212 async readFile(
213 path: string,
214 options?: ReadFileOptions | BufferEncoding
215 ): Promise<string> {
216 return fromBuffer(await this.readFileBytes(path), getEncoding(options));
217 }
218
219 async readFileBytes(path: string): Promise<Uint8Array> {
220 validatePath(path, "open");

Callers

nothing calls this directly

Calls 3

readFileBytesMethod · 0.95
fromBufferFunction · 0.90
getEncodingFunction · 0.90

Tested by

no test coverage detected