MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / walkSize

Function walkSize

packages/aws-lambda/scripts/build-zip.ts:525–533  ·  view source on GitHub ↗
(dir: string)

Source from the content-addressed store, hash-verified

523}
524
525function walkSize(dir: string): number {
526 let total = 0;
527 for (const entry of readdirSync(dir, { withFileTypes: true })) {
528 const full = join(dir, entry.name);
529 if (entry.isDirectory()) total += walkSize(full);
530 else if (entry.isFile()) total += statSync(full).size;
531 }
532 return total;
533}
534
535void main().catch((err) => {
536 console.error("[build-zip] failed:", err instanceof Error ? err.message : String(err));

Callers 1

directorySizeBytesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected