disk-space 0.1.1

Tiny lib for disk space info of os file system (cross-platform).
Documentation
  • Coverage
  • 50%
    5 out of 10 items documented0 out of 5 items with examples
  • Size
  • Source code size: 24.71 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.5 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 52s Average build duration of successful builds.
  • all releases: 35s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • nabbisen/disk-space-rs
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • nabbisen

disk-space-rs

crates.io License Rust Documentation Dependency Status

Tiny lib for disk space info of os file system (cross-platform supported)

use std::path::PathBuf;
use disk_space::DiskSpace;

const MIN_DISKSPACE_MB: f64 = 512.0;

let path = PathBuf::from("/");
let disk_space = DiskSpace::new(&path).expect("failed to get file system info");

let disk_space_mb_available = disk_space.as_mb().available;
let disk_space_ok = (MIN_DISKSPACE_MB) < disk_space_mb_available;