MCPcopy Create free account
hub / github.com/cobusgreyling/loop-engineering / copyDir

Function copyDir

tools/loop-init/src/cli.ts:100–110  ·  view source on GitHub ↗
(src: string, dest: string, dryRun: boolean)

Source from the content-addressed store, hash-verified

98}
99
100async function copyDir(src: string, dest: string, dryRun: boolean) {
101 if (!(await exists(src))) return false;
102 if (dryRun) {
103 console.log(` would copy: ${src} → ${dest}`);
104 return true;
105 }
106 await mkdir(path.dirname(dest), { recursive: true });
107 await cp(src, dest, { recursive: true });
108 console.log(` copied: ${src} → ${dest}`);
109 return true;
110}
111
112async function resolveBundledOrMonorepo(name: 'starters' | 'templates'): Promise<string> {
113 const bundled = path.join(PACKAGE_ROOT, name);

Callers 1

mainFunction · 0.85

Calls 1

existsFunction · 0.70

Tested by

no test coverage detected