MCPcopy Create free account
hub / github.com/Paper2Poster/Paper2Poster / copy_folder

Function copy_folder

demo/pipeline.py:24–32  ·  view source on GitHub ↗
(src_dir, dst_dir)

Source from the content-addressed store, hash-verified

22sys.path.append(str(P2P_ROOT))
23
24def 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
34def copytree_overwrite(src: Path, dst: Path):
35 if dst.exists():

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected