Skip to main content

hash_file

Function hash_file 

Source
pub fn hash_file(algo: HashAlgorithm, path: &Path) -> Result<String>
Expand description

Hash a file by path. Uses streaming read with sequential fadvise hint. Streaming avoids MAP_POPULATE blocking (pre-faults all pages upfront) and mmap setup/teardown overhead for small files.