dagolden / Path-Tiny

File path utility
41 stars 58 forks source link

Support size option for digest to limit to first n bytes #288

Closed grr closed 10 months ago

grr commented 10 months ago

Digest already has a chunk_size option, so this seems complimentary. Currently the user has to copy the logic of digest(), so this would be a big convenience. It might also be a tiny convenience to have the option for slurp() to save the user from having to open the filehandle and using read/sysread.

xdg commented 10 months ago

I appreciate the suggestion. Generally, I think most people want a digest of entire files, not portions of it. As this is explicitly a "Tiny" module, I'm not inclined to add a partial-file digest feature.