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

Method readdir

packages/computer/src/stub.ts:176–186  ·  view source on GitHub ↗
(path: string, options: ReaddirOptions = {})

Source from the content-addressed store, hash-verified

174 }
175
176 readdir(path: string, options: ReaddirOptions = {}): Promise<WorkspaceDirentResult[]> {
177 return withSpan(
178 this.#ws.observer,
179 "workspace.fs.readdir",
180 { "workspace.fs.path": path },
181 () => this.#ws.fs.readdir(path, options),
182 (span, outcome) => {
183 if (outcome.ok) span.setAttribute("workspace.fs.entries", outcome.value.length);
184 },
185 );
186 }
187
188 find(directory: string, pattern?: string): Promise<WorkspaceFoundEntry[]> {
189 return withSpan(

Callers

nothing calls this directly

Calls 3

withSpanFunction · 0.85
readdirMethod · 0.65
setAttributeMethod · 0.65

Tested by

no test coverage detected