MCPcopy Create free account
hub / github.com/PRQL/prql / copy_dir

Function copy_dir

prqlc/prqlc/src/cli/test.rs:390–401  ·  view source on GitHub ↗
(src: &Path, dst: &Path)

Source from the content-addressed store, hash-verified

388}
389
390fn copy_dir(src: &Path, dst: &Path) {
391 for entry in WalkDir::new(src) {
392 let entry = entry.unwrap();
393 let path = entry.path();
394 if path.is_file() {
395 let relative_path = path.strip_prefix(src).unwrap();
396 let target_path = dst.join(relative_path);
397 fs::create_dir_all(target_path.parent().unwrap()).unwrap();
398 fs::copy(path, target_path).unwrap();
399 }
400 }
401}
402
403fn compare_directories(dir1: &Path, dir2: &Path) {
404 for entry in WalkDir::new(dir1).into_iter().filter_map(|e| e.ok()) {

Callers 1

formatFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected