MCPcopy Index your code
hub / github.com/cobusgreyling/loop-engineering / copyFile

Function copyFile

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

Source from the content-addressed store, hash-verified

266}
267
268async function copyFile(src: string, dest: string, dryRun: boolean) {
269 if (!(await exists(src))) return false;
270 if (dryRun) {
271 console.log(` would copy: ${src} → ${dest}`);
272 return true;
273 }
274 await mkdir(path.dirname(dest), { recursive: true });
275 await cp(src, dest);
276 console.log(` copied: ${src} → ${dest}`);
277 return true;
278}
279
280const OPENCODE_RUN = 'opencode run';
281

Callers 5

copyTemplateSkillFunction · 0.85
copyTemplateVerifierFunction · 0.85
scaffoldObservabilityFunction · 0.85
scaffoldConstraintsFunction · 0.85
mainFunction · 0.85

Calls 1

existsFunction · 0.70

Tested by

no test coverage detected