Skip to main content

blake3_file

Function blake3_file 

Source
pub fn blake3_file(path: &Path) -> Result<Hash>
Expand description

blake3 of the file’s bytes at path (open → mmap → hash, multi-core).

This hashes the on-disk contents, not the path string and not the in-memory mapped image — see the module docs for why that distinction is the whole point of the primitive.

Uses blake3::Hasher::update_mmap_rayon: the file is memory-mapped (page-cache-warm for a just-executed binary) and hashed across all cores.

§Errors

Returns the underlying io::Error if the file cannot be opened or mapped (e.g. it does not exist, or permission is denied).