#file-search #finder #file-finder #cli

keepr

Simple and customizable file finder for Rust

6 releases

Uses new Rust 2024

0.1.5 Jul 29, 2025
0.1.4 Jul 29, 2025
0.1.2 May 9, 2025
0.1.1 Apr 29, 2025

#2555 in Filesystem

MIT license

6KB
139 lines

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::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);
    });
}

Dependencies