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

Function readdir

packages/computerd/src/fuse/driver.ts:463–474  ·  view source on GitHub ↗
(path, cb)

Source from the content-addressed store, hash-verified

461 error: notImplemented("error"),
462
463 readdir(path, cb) {
464 try {
465 const entries = new Set(vfs.readdirSync(toVfs(path)));
466 for (const [pendingPath, entry] of files) {
467 if (entry.pendingCreate && parentPath(pendingPath) === path)
468 entries.add(baseName(pendingPath));
469 }
470 cb(0, [...entries]);
471 } catch (error) {
472 cb(toErrno(error), []);
473 }
474 },
475
476 getattr(path, cb) {
477 try {

Callers

nothing calls this directly

Calls 6

toVfsFunction · 0.85
parentPathFunction · 0.85
baseNameFunction · 0.85
toErrnoFunction · 0.85
readdirSyncMethod · 0.80
addMethod · 0.65

Tested by

no test coverage detected