1 2 3 4 5 6 7 8 9 10 11 12
use walkdir::*; /// Function to count the number of entries in a directory. /// Is needed to get a progress. pub fn filecount(path : &str) -> u64 { let mut counter : u64 = 0; for _ in WalkDir::new(path).into_iter().filter_map(|e| e.ok()) { counter += 1; } counter }