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%
Create a small utility that synchronizes a subset of files from one directory to another using a caller-provided filter, surfacing a clear failure when nothing qualifies for copying.
clean is true and the destination already contains files, the existing destination tree is removed before copying so the final contents mirror the filtered source. @test@generates
export type PathFilter = RegExp | ((absolutePath: string) => boolean);
export interface FilterCopyOptions {
filter: PathFilter;
clean?: boolean;
}
export function copyFilteredTree(
source: string,
destination: string,
options: FilterCopyOptions
): Promise<string[]>;Recursively copies files and directories with filtering, destination cleanup, and error propagation for empty copy sets. @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