Initial Commit.

This commit is contained in:
Olivia Brooks
2026-01-25 21:20:03 -05:00
commit ef07526d57
15 changed files with 1561 additions and 0 deletions

16
src/fs.rs Normal file
View File

@@ -0,0 +1,16 @@
use std::path::{Path, PathBuf};
pub fn expand_files<P: AsRef<Path>>(path: P) -> anyhow::Result<Vec<PathBuf>> {
let path = path.as_ref();
if path.is_file() {
return Ok(vec![path.to_path_buf()]);
}
Ok(std::fs::read_dir(path)?
.filter_map(|entry| {
let path = entry.ok()?.path();
if path.is_file() { Some(path) } else { None }
})
.collect())
}