MCPcopy Create free account
hub / github.com/FastLED/FastLED / _hash_file

Function _hash_file

ci/meson/build_optimizer.py:46–55  ·  view source on GitHub ↗

Compute SHA-256 hash of a file's content. Returns empty string on error.

(path: Path)

Source from the content-addressed store, hash-verified

44
45
46def _hash_file(path: Path) -> str:
47 """Compute SHA-256 hash of a file's content. Returns empty string on error."""
48 try:
49 hasher = hashlib.sha256()
50 with open(path, "rb") as f:
51 for chunk in iter(lambda: f.read(65536), b""):
52 hasher.update(chunk)
53 return hasher.hexdigest()
54 except OSError:
55 return ""
56
57
58def _find_dlls(build_dir: Path) -> list[Path]:

Callers 2

save_fingerprintsMethod · 0.70

Calls 2

readMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected