[−][src]Function lms::file_ops::hash_file
pub fn hash_file<S>(file_to_hash: &S, location: &str) -> Option<u64> where
S: FileOps,
Generates a hash of the given file, using the Seahash non-cryptographic hash function
Arguments
file_to_hash
: file object to hashlocation
: base directory of the file to hash, such thatlocation + 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