owmeta_core.file_utils module¶
- owmeta_core.file_utils.hash_file(hsh, fname, blocksize=None)[source]¶
Updates the given hash object with the contents of a file.
The file is read in
blocksize
chunks to avoid eating up too much memory at a time.- Parameters
- hsh
hashlib.hash
The hash object to update
- fname
str
The filename for the file to hash
- blocksize
int
,optional
The number of bytes to read at a time. If not provided, will use
hsh.block_size
instead.
- hsh