RustPhysicsMQ/src/helpers.rs

12 lines
264 B
Rust
Raw Normal View History

use std::fs;
2025-12-14 22:04:23 +00:00
use std::path::PathBuf;
pub fn list_files(dir: &str) -> Vec<PathBuf> {
fs::read_dir(dir)
.expect("Failed to read directory")
.filter_map(|e| e.ok())
.map(|e| e.path())
.filter(|p| p.is_file())
.collect()
}