Cross-platform recursive file copying library that replicates Unix 'cp -R' command functionality
66
Build a utility that copies all contents from a source template directory into a target workspace while creating any missing directories and preserving file permissions.
verify is true, re-stat each copied path after completion and throw an error if any are missing; otherwise resolves with the paths. @test@generates
export async function syncTemplateTree(
sourceDir,
targetDir,
options = {}
);
/**
* @param {string} sourceDir absolute path to existing source directory
* @param {string} targetDir absolute path to target root (may not exist)
* @param {object} options
* @param {boolean} [options.verify=false] when true, ensure each copied path exists after the operation
* @returns {Promise<string[]>} absolute destination paths for files and directories, sorted
* @throws if sourceDir is invalid, copy fails, or verification fails
*/Provides recursive copy with automatic directory creation and permission preservation.
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