Cross-platform recursive file copying library that replicates Unix 'cp -R' command functionality
66
Ensure every directory from a template tree, including empty ones, exists under a target root without deleting any existing sibling content.
data/cache and a target already containing data/uploads/file.txt, running the copier creates data/cache under the target while leaving data/uploads/file.txt untouched. @testconfigs/env/dev, the copier ensures the full path exists in the target even if intermediate directories are missing. @test@generates
/**
* Ensure all directories from a template path exist under a target root without deleting existing siblings or their contents.
*
* @param {string} templateRoot absolute path to the template directory that may contain empty folders
* @param {string} targetRoot absolute path to the destination root
* @returns {Promise<string[]>} absolute paths of directories ensured or created in the target
*/
async function ensureTemplateDirectories(templateRoot, targetRoot) {}Provides recursive copy support for directories and files, preserving modes.
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