hash_file

Function hash_file 

Source
pub fn hash_file<S>(file_to_hash: &S, location: &str) -> Option<u64>
where S: FileOps,
Expand description

Generates a hash of the given file, using the Seahash non-cryptographic hash function

§Arguments

  • file_to_hash: file object to hash
  • location: base directory of the file to hash, such that location + file_to_hash.path() is the absolute path of the file

§Returns

  • Some: The hash of the given file
  • Err: If the given file cannot be hashed