Crates.io | dircs |
lib.rs | dircs |
version | 0.1.9 |
source | src |
created_at | 2023-05-29 21:41:00.614158 |
updated_at | 2024-05-23 03:26:10.328931 |
description | A small cross-platform utility to get the hash of a file or directory. |
homepage | |
repository | https://github.com/ClementTsang/dircs |
max_upload_size | |
id | 877339 |
size | 52,282 |
A small cross-platform utility to get the hash of a file or directory. Comes with a variety of hash functions to choose from.
Note: I mostly wrote this for my own personal use, so there might be a lot of rough edges. Feel free to submit pull requests, feature requests, or bug reports.
dircs
is on crates.io and can be installed with cargo
:
cargo install dircs --locked
As of writing, dircs
has been tested to build using Rust 1.69.0.
$ dircs /your/path/here
/your/path/here -> 72ce3b5f2df28051cf7204712fe93de6b7b6d1f8e8fe5972b117a248423c290c
By default, dircs
will use BLAKE3 with memmapping disabled, and an automatic level of parallelism.
See more options by running dircs -h
.
Currently, the following hash functions are supported:
For a single file or a directory with just one file, dircs
will simply hash the file using the specified hash
function, and output the bytes as a hex string.
For a directory with multiple files, we do the following:
Thanks to: