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%
Build a utility that copies a single file into a destination path that should be treated as a directory whenever the path ends with a trailing separator. Use the dependency for the filesystem operations rather than reimplementing copy logic.
overwrite is false or omitted, fail with a clear "already exists" style error and leave the existing file unchanged. @testoverwrite is true, replace the file and return the destination path list reflecting the new copy. @test@generates
export async function copySingleFile(
sourcePath: string,
destinationPath: string,
options?: {
overwrite?: boolean;
verify?: boolean;
}
): Promise<string[]>;sourcePath is the path to an existing file to copy. destinationPath may end with a trailing path separator; when it does, treat it as a directory target (even if the directory does not exist yet) and append the source basename for the final destination file. When the destination path lacks a trailing separator, treat it as the full file target. options.overwrite controls whether existing destination files may be replaced. options.verify triggers a post-copy check that all expected destinations exist. On success, return a sorted list of destination paths written; throw errors when copy steps fail, including any aggregated filesystem errors surfaced by the dependency.
Performs filesystem copy with directory creation, trailing-separator handling, overwrite control, and optional post-copy verification.
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