checksumdir icon indicating copy to clipboard operation
checksumdir copied to clipboard

Add option to use stat instead of file bytes.

Open fbristow opened this issue 5 years ago • 0 comments

Calculating the hash of a directory using bytes can get expensive quickly, especially when working with large media files (e.g., videos). This commit adds an option to choose which data source is used to get bytes to be added to the hash, one of:

  • 'deep' (default): read all the bytes in the file into the hash.
  • 'shallow': do a stat on the file and use the filename and all values from the stat, as returned by os.stat.

@cakepietoast I'd be happy to make any changes to this that you deem appropriate, please let me know. Feel free to close this request if the change is unwanted.

fbristow avatar Jun 12 '19 01:06 fbristow