pub fn bytes_of_file(
path: &Path,
num_bytes_from_start: u64,
kind: Kind,
progress: &mut dyn Progress,
should_interrupt: &AtomicBool,
) -> Result<ObjectId, Error>Available on crate feature
index only.Expand description
Compute the hash of kind for the bytes in the file at path, hashing only the first num_bytes_from_start
while initializing and calling progress.
num_bytes_from_start is useful to avoid reading trailing hashes, which are never part of the hash itself,
denoting the amount of bytes to hash starting from the beginning of the file.
ยงNote
- Interrupts are supported.