Keepr
Simple and customizable file finder for Rust.
Features
- Ignore specific directories
- Ignore specific files
- Match specific files
- Limit search depth
- Callback for each match
Example
use Finder;
use Path;
Simple and customizable file finder for Rust.
use finder::Finder;
use std::path::Path;
fn main() {
let finder = Finder {
ignore_dirs: vec!["target".into(), ".git".into()],
ignore_files: vec!["Cargo.lock".into()],
match_files: vec!["main.rs".into()],
max_depth: Some(3),
};
finder.find("./", &mut |path: &Path| {
println!("Found file: {:?}", path);
});
}