(src_dir, dst_dir)
| 22 | sys.path.append(str(P2P_ROOT)) |
| 23 | |
| 24 | def copy_folder(src_dir, dst_dir): |
| 25 | src_dir = Path(src_dir) |
| 26 | dst_dir = Path(dst_dir) |
| 27 | if not src_dir.exists(): |
| 28 | raise FileNotFoundError(f"no such dir: {src_dir}") |
| 29 | if dst_dir.exists(): |
| 30 | shutil.rmtree(dst_dir) |
| 31 | shutil.copytree(src_dir, dst_dir) |
| 32 | print(f"✅ Copied folder {src_dir} → {dst_dir}") |
| 33 | |
| 34 | def copytree_overwrite(src: Path, dst: Path): |
| 35 | if dst.exists(): |
nothing calls this directly
no outgoing calls
no test coverage detected