MCPcopy Create free account
hub / github.com/adcontextprotocol/adcp / walk

Function walk

scripts/backfill-c2pa-static.ts:33–43  ·  view source on GitHub ↗
(dir: string, out: string[])

Source from the content-addressed store, hash-verified

31}
32
33async function walk(dir: string, out: string[]): Promise<void> {
34 if (!fs.existsSync(dir)) return;
35 for (const entry of await fs.promises.readdir(dir, { withFileTypes: true })) {
36 const full = path.join(dir, entry.name);
37 if (entry.isDirectory()) {
38 await walk(full, out);
39 } else if (entry.isFile() && entry.name.toLowerCase().endsWith(".png")) {
40 out.push(full);
41 }
42 }
43}
44
45async function hasEmbeddedManifest(buffer: Buffer, mimeType: string): Promise<boolean> {
46 try {

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected