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

Method readdirSync

packages/dofs/src/provider.ts:243–249  ·  view source on GitHub ↗
(path: string, options?: { withFileTypes?: boolean })

Source from the content-addressed store, hash-verified

241 }
242
243 readdirSync(path: string, options?: { withFileTypes?: boolean }): string[] | VirtualDirentLike[] {
244 const entries = readdirImpl(this.db, path);
245 if (options?.withFileTypes === true) {
246 return entries.map((entry) => wrapDirent(entry));
247 }
248 return entries.map((entry) => entry.name);
249 }
250
251 mkdir(path: string, options?: MkdirOptions): Promise<string | undefined> {
252 return Promise.resolve(this.mkdirSync(path, options));

Callers 8

readdirMethod · 0.95
provider.test.tsFile · 0.80
fs-ops.bench.tsFile · 0.80
materialiseVfsToDiskFunction · 0.80
flushVfsToDiskFunction · 0.80
vfs.test.tsFile · 0.80
readdirFunction · 0.80
driver.test.tsFile · 0.80

Calls 1

wrapDirentFunction · 0.85

Tested by

no test coverage detected