MCPcopy Create free account
hub / github.com/TraderAlice/OpenAlice / snapshotFiles

Function snapshotFiles

src/workspaces/transcript-watcher.ts:352–359  ·  view source on GitHub ↗
(dir: string, fileRe: RegExp)

Source from the content-addressed store, hash-verified

350}
351
352async function snapshotFiles(dir: string, fileRe: RegExp): Promise<Set<string>> {
353 const out = new Set<string>();
354 const entries = await readdir(dir);
355 for (const name of entries) {
356 if (fileRe.test(name)) out.add(name);
357 }
358 return out;
359}
360
361function isENOENT(err: unknown): boolean {
362 return typeof err === 'object' && err !== null && (err as { code?: string }).code === 'ENOENT';

Callers 1

registerMethod · 0.85

Calls 1

addMethod · 0.65

Tested by

no test coverage detected