file-finder

Crates.iofile-finder
lib.rsfile-finder
version0.1.0
sourcesrc
created_at2022-11-20 21:35:07.960374
updated_at2022-11-20 21:35:07.960374
descriptionAn easy to use library to find the files you want
homepagehttps://github.com/flickyiyo/file-finder
repositoryhttps://github.com/flickyiyo/file-finder
max_upload_size
id719418
size7,995
Edgar Vazquez (flickyiyo)

documentation

README

An easy to use library to find the files you want

Just import and call the function, use std lib &Path to filter and find your files.

Usage

let config = FileFinderConfig {
    dir: Some("subpath") // Defaults ".",
    filter: Some(|path| {
        path.ends_with(".js") // Gets only js files
    }),
    skipped_dirs: Some(|path| {
        path.ends_with("node_modules") // Skips children of every `node_modules` dir inside `dir` proeprty.
    }),
    err_behavior: ErrorBehavior::Log // Will log error messages but continue execution
}
let found_files: Vec<PathBuf> = find_files(config)
Commit count: 8

cargo fmt