CtrlK
CommunityDocumentationLog inGet started
Tessl Logo

tessl/npm-cpr

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%

Overview
Eval results
Files

task.mdevals/scenario-7/

Template Skeleton Copier

Ensure every directory from a template tree, including empty ones, exists under a target root without deleting any existing sibling content.

Capabilities

Preserve siblings while copying empty directories

  • Given a template with empty 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. @test
  • When the template includes nested empty directories such as configs/env/dev, the copier ensures the full path exists in the target even if intermediate directories are missing. @test
  • Running the copier multiple times is idempotent: previously created directories remain, and no existing siblings are deleted. @test

Implementation

@generates

API

/**
 * 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) {}

Dependencies { .dependencies }

cpr { .dependency }

Provides recursive copy support for directories and files, preserving modes.

tessl i tessl/npm-cpr@3.0.0

tile.json