MCPcopy Create free account
hub / github.com/f0rr0/oliphaunt / sha256_file

Function sha256_file

xtask/src/main.rs:9502–9505  ·  view source on GitHub ↗
(path: &Path)

Source from the content-addressed store, hash-verified

9500}
9501
9502fn sha256_file(path: &Path) -> Result<String> {
9503 let bytes = fs::read(path).with_context(|| format!("read {}", path.display()))?;
9504 Ok(sha256_bytes(&bytes))
9505}
9506
9507fn decode_zstd_file(path: &Path) -> Result<Vec<u8>> {
9508 let file = fs::File::open(path).with_context(|| format!("open {}", path.display()))?;

Callers 7

verify_file_sha256Function · 0.70
write_manifestMethod · 0.70
package_aot_artifactsFunction · 0.70
write_asset_manifestFunction · 0.70

Calls 1

sha256_bytesFunction · 0.85

Tested by

no test coverage detected