Parallelized directory size calculation
https://crates.io/crates/dir-size
| LICENSES | Add MPL-2.0 license | |
| src | feat!: add SI unit support | |
| .gitignore | Initial commit | |
| .woodpecker.yaml | Add manual to Woodpecker event list | |
| Cargo.lock | chore: release version 0.1.1 | |
| Cargo.toml | chore: release version 0.1.1 | |
| COPYING | Add MPL-2.0 license | |
| README.md | README: update code sample | |
dir-size
dir-size is a crate that calculates directory size in parallel using rayon.
Usage
This is a little code sample:
usedir_size::{get_size_in_bytes,get_size_in_human_bytes,get_size_in_abbr_human_bytes};usestd::{io,path::Path};fn main()-> io::Result<()>{letpath=Path::new("/home");println!("{} Bytes",get_size_in_bytes(path)?);println!("{}",get_size_in_human_bytes(path)?);println!("{}",get_size_in_abbr_human_bytes(path)?);Ok(())}