MCPcopy Create free account
hub / github.com/ParzivalHack/PySpector / _disk_path

Method _disk_path

src/pyspector/ast_cache.py:400–404  ·  view source on GitHub ↗
(self, file_path: Path)

Source from the content-addressed store, hash-verified

398 # ── Disk I/O ─────────────────────────────────────────────────────────────
399
400 def _disk_path(self, file_path: Path) -> Optional[Path]:
401 if not self._cache_dir:
402 return None
403 key = hashlib.sha256(str(file_path.resolve()).encode()).hexdigest()
404 return self._cache_dir / f"{key}.json"
405
406 def _disk_load(self, file_path: Path, file_hash: str) -> Optional[FileCacheEntry]:
407 p = self._disk_path(file_path)

Calls

no outgoing calls