use sized::{scan_tree, ScanControl, ScanOptions}; use std::{error::Error, path::PathBuf}; fn main() -> Result<(), Box> { let Some(path) = std::env::args_os().nth(1).map(PathBuf::from) else { eprintln!("Usage: scan PATH"); std::process::exit(2); }; let report = scan_tree(&path, &ScanOptions::default(), &ScanControl::default())?; println!( "apparent={} allocated={} entries={} complete={} issues={}", report.root.size_bytes, report.root.blocks * 512, report.entries_scanned, report.root.complete, report.issues.len() ); if !report.root.complete { for issue in report.issues { eprintln!("{}: {}", issue.path.display(), issue.message); } std::process::exit(1); } Ok(()) }