Cross-platform recursive file copying library that replicates Unix 'cp -R' command functionality
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
Install with Tessl CLI
npx tessl i tessl/npm-cprdocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10