Parallelized directory size calculation https://crates.io/crates/dir-size
Integral 96aea498dd
All checks were successful
ci/woodpecker/push/woodpecker/1 Pipeline was successful
ci/woodpecker/push/woodpecker/3 Pipeline was successful
ci/woodpecker/push/woodpecker/2 Pipeline was successful
Add manual to Woodpecker event list
2025-07-22 11:25:38 +08:00
LICENSES Add MPL-2.0 license 2024-11-26 02:19:10 +08:00
src feat!: add SI unit support 2025-07-17 12:11:03 +08:00
.gitignore Initial commit 2024-11-26 00:51:15 +08:00
.woodpecker.yaml Add manual to Woodpecker event list 2025-07-22 11:25:38 +08:00
Cargo.lock chore: release version 0.1.1 2024-12-07 13:16:47 +08:00
Cargo.toml chore: release version 0.1.1 2024-12-07 13:16:47 +08:00
COPYING Add MPL-2.0 license 2024-11-26 02:19:10 +08:00
README.md README: update code sample 2024-12-07 13:14:00 +08:00

dir-size

status-badge

dir-size is a crate that calculates directory size in parallel using rayon.

Usage

This is a little code sample:

use dir_size::{get_size_in_bytes, get_size_in_human_bytes, get_size_in_abbr_human_bytes};
use std::{io, path::Path};

fn main() -> io::Result<()> {
    let path = 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(())
}