[][src]Function git_features::hash::bytes_of_file

pub fn bytes_of_file(
    path: impl AsRef<Path>,
    num_bytes_from_start: usize,
    kind: HashKind,
    progress: &mut impl Progress
) -> Result<Id>

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.

Note