MCPcopy Index your code
hub / github.com/humanlayer/12-factor-agents / copyDirectory

Function copyDirectory

packages/walkthroughgen/src/cli.ts:58–73  ·  view source on GitHub ↗
(src: string, dest: string)

Source from the content-addressed store, hash-verified

56}
57
58function copyDirectory(src: string, dest: string): void {
59 if (!fs.existsSync(src)) return;
60 fs.mkdirSync(dest, { recursive: true });
61 const entries = fs.readdirSync(src, { withFileTypes: true });
62
63 for (const entry of entries) {
64 const srcPath = path.join(src, entry.name);
65 const destPath = path.join(dest, entry.name);
66
67 if (entry.isDirectory()) {
68 copyDirectory(srcPath, destPath);
69 } else {
70 fs.copyFileSync(srcPath, destPath);
71 }
72 }
73}
74
75function applyStepsToWorkingDir(
76 steps: Section['steps'],

Callers 1

cliFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected