use std::fs; use std::path::{Path, PathBuf}; pub fn list_files(dir: &str) -> Vec { fs::read_dir(dir) .expect("Failed to read directory") .filter_map(|e| e.ok()) .map(|e| e.path()) .filter(|p| p.is_file()) .collect() }