MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / hash_file

Function hash_file

atomic-agent/src/integrations/receipt.rs:171–174  ·  view source on GitHub ↗

Blake3 hex digest of a file's contents.

(path: &Path)

Source from the content-addressed store, hash-verified

169
170/// Blake3 hex digest of a file's contents.
171pub fn hash_file(path: &Path) -> AgentResult<String> {
172 let bytes = std::fs::read(path)?;
173 Ok(blake3::hash(&bytes).to_hex().to_string())
174}
175
176#[cfg(test)]
177mod tests {

Callers 3

install_from_dirFunction · 0.85
uninstallFunction · 0.85
install_decisionFunction · 0.85

Calls 2

to_hexMethod · 0.80
hashFunction · 0.50

Tested by

no test coverage detected