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

Method stat

packages/computer/src/tools/fs/store.ts:40–49  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

38 constructor(private readonly ws: WorkspaceLike) {}
39
40 async stat(path: string): Promise<FileStat | null> {
41 try {
42 const s = await this.ws.fs.stat(path);
43 if (!s.isFile) return null;
44 return { size: s.size, mtime: s.mtime, mode: s.mode };
45 } catch (err) {
46 if (isEnoent(err)) return null;
47 throw err;
48 }
49 }
50
51 async readAll(path: string): Promise<Uint8Array | null> {
52 try {

Callers

nothing calls this directly

Calls 2

isEnoentFunction · 0.70
statMethod · 0.65

Tested by

no test coverage detected