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

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

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