MCPcopy
hub / github.com/nesquena/hermes-webui / _backup_file

Function _backup_file

scripts/repair_workspace_user_turns.py:66–68  ·  view source on GitHub ↗
(path: Path, backup_dir: Path)

Source from the content-addressed store, hash-verified

64
65
66def _backup_file(path: Path, backup_dir: Path) -> None:
67 backup_dir.mkdir(parents=True, exist_ok=True)
68 shutil.copy2(path, backup_dir / path.name)
69
70
71def repair_sidecars(sessions_dir: Path, backup_dir: Path | None = None, dry_run: bool = False) -> dict[str, Any]:

Callers 2

repair_sidecarsFunction · 0.70
repair_state_dbFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected