MCPcopy Create free account
hub / github.com/bigdra50/unity-cli / load

Method load

unity_cli/api/uitree_snapshot.py:52–61  ·  view source on GitHub ↗

Load a saved snapshot. Returns None if not found.

(self, name: str)

Source from the content-addressed store, hash-verified

50 return path
51
52 def load(self, name: str) -> dict[str, Any] | None:
53 """Load a saved snapshot. Returns None if not found."""
54 path = self._path(name)
55 if not path.exists():
56 return None
57 try:
58 result: dict[str, Any] = json.loads(path.read_text(encoding="utf-8"))
59 return result
60 except (json.JSONDecodeError, OSError):
61 return None
62
63 def diff(self, name: str, current: dict[str, Any]) -> dict[str, Any]:
64 """Compare current tree against a saved snapshot."""

Callers 1

diffMethod · 0.95

Calls 1

_pathMethod · 0.95

Tested by

no test coverage detected