dir-size

Crates.iodir-size
lib.rsdir-size
version0.1.1
sourcesrc
created_at2024-11-25 17:41:14.674805
updated_at2024-12-07 05:22:53.063138
descriptionParallelized directory size calculation
homepagehttps://codeberg.org/Integral/dir-size
repositoryhttps://codeberg.org/Integral/dir-size
max_upload_size
id1460533
size40,732
Integral (Integral-Tech)

documentation

README

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(())
}
Commit count: 0

cargo fmt