MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / copy_if_exists

Function copy_if_exists

tasks/scripts/sync_docs_website.py:120–123  ·  view source on GitHub ↗
(src: Path, dst: Path)

Source from the content-addressed store, hash-verified

118
119
120def copy_if_exists(src: Path, dst: Path) -> None:
121 if src.exists():
122 dst.parent.mkdir(parents=True, exist_ok=True)
123 shutil.copy2(src, dst)
124
125
126def read_yaml(path: Path) -> YamlMapping:

Callers 1

sync_docsFunction · 0.85

Calls 1

existsMethod · 0.80

Tested by

no test coverage detected