Cross-platform recursive file copying library that replicates Unix 'cp -R' command functionality
Agent Success
Agent success rate when using this tile
66%
Improvement
Agent success rate improvement when using this tile compared to baseline
1x
Baseline
Agent success rate without this tile
66%
A utility that copies a template directory into a workspace while controlling how existing files are handled and reporting the outcome.
overwriteExisting is false, the operation completes without replacing it, still copies non-conflicting files, and marks the conflicting destination path as skipped. @testoverwriteExisting is true, an existing conflicting file at the destination is replaced with the template version while other files remain intact, and the replaced path is recorded. @testcopied, replaced, and skipped entries for everything processed. @test@generates
export type OverwriteControlOptions = {
overwriteExisting?: boolean;
};
export type CopyReport = {
copied: string[];
replaced: string[];
skipped: { path: string; reason: "exists" | "conflict" }[];
};
export async function copyTemplate(
templateDir: string,
destinationDir: string,
options?: OverwriteControlOptions
): Promise<CopyReport>;Performs cross-platform recursive copying with configurable overwrite behavior.
@satisfied-by
tessl i tessl/npm-cpr@3.0.0docs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10