MCPcopy
hub / github.com/pex-tool/pex / iter_files

Function iter_files

scripts/build-cache-image.py:60–66  ·  view source on GitHub ↗
(path: Path)

Source from the content-addressed store, hash-verified

58
59def fingerprint_cache_inputs(image_id: str | None = None) -> str:
60 def iter_files(path: Path) -> Iterator[Path]:
61 if path.is_dir():
62 for root, dirs, files in os.walk(path):
63 for f in files:
64 yield Path(root) / f
65 else:
66 yield path
67
68 hashes = {
69 str(path): hashlib.sha256(path.read_bytes()).hexdigest()

Callers 1

fingerprint_cache_inputsFunction · 0.70

Calls 1

is_dirMethod · 0.80

Tested by

no test coverage detected