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%
Utility for copying multiple source paths into a workspace root using robust recursive copying with optional cleanup, filtering, and verification.
targetRoot, preserving nested structure, and resolves with a sorted list of absolute destination paths returned by the dependency on success. @testignorePattern is provided, paths whose absolute locations match the pattern are excluded from copying while all other paths are copied. @testclean is true and a destination already exists with extra files, those files are removed before copying so the final destination contents match the sources. @testverify is true and any expected destination path is missing after copying, the promise rejects with an error; when every copied path exists, it resolves normally. @testUse the dependency's recursive copy facility for each manifest entry instead of manual filesystem traversal or shell commands.
@generates
export interface ManifestEntry {
/**
* Absolute or relative path to copy from.
*/
source: string;
/**
* Destination path relative to targetRoot.
*/
destination: string;
}
export interface SyncOptions {
/**
* Directory under which all destination paths are created.
*/
targetRoot: string;
/**
* Regex tested against absolute source paths to exclude matching items.
*/
ignorePattern?: RegExp;
/**
* Remove destination before copying when true.
*/
clean?: boolean;
/**
* Re-verify that every reported destination path exists after copying.
*/
verify?: boolean;
/**
* Allow overwriting when destinations already exist.
*/
overwrite?: boolean;
}
/**
* Copies all manifest entries into the workspace root, applying filtering, cleanup,
* and optional verification before resolving with sorted absolute destination paths.
*/
export function syncWorkspace(manifest: ManifestEntry[], options: SyncOptions): Promise<string[]>;Provides recursive copy with filtering, overwrite control, optional cleanup, and a list of copied destination paths.
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