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-5/

Verified Copy with Post-Copy Checks

Create a module that replicates a directory tree while verifying that every copied path exists on disk immediately after the operation.

Capabilities

Copies and verifies tree

  • Copying a directory with nested files from sourceDir to targetDir returns a sorted array of destination paths, and each reported path exists on disk after verification. @test

Fails when verification is missing

  • If a destination file is removed right after the copy, the operation rejects with an error that identifies the missing destination path discovered during verification. @test

Respects filter exclusions

  • When provided a filter that excludes certain paths (for example matching /\\.log$/), the returned path list omits those items and verification does not expect them to exist. @test

Implementation

@generates

API

export interface CopyOptions {
  overwrite?: boolean;
  filter?: RegExp | ((path: string) => boolean);
}

export function replicateWithVerification(
  source: string,
  destination: string,
  options?: CopyOptions
): Promise<string[]>;

Dependencies { .dependencies }

cpr { .dependency }

Recursive copy utility with built-in post-copy verification of copied paths. @satisfied-by

tessl i tessl/npm-cpr@3.0.0

tile.json