use std::path::PathBuf; pub fn get_files>(path: S) -> Vec { let mut files = Vec::new(); let mut dirs = Vec::new(); dirs.push(PathBuf::from(path.into())); while let Some(dir) = dirs.pop() { for entry in std::fs::read_dir(dir).unwrap() { let entry = entry.unwrap(); let path = entry.path(); if path.is_dir() { dirs.push(path); } else { files.push(path); } } } files }