#recursion #particular #file-search #directories #extension #match #find

discoverer

Recursively search directories for a particular type of file

3 releases (breaking)

0.2.0 Jan 7, 2023
0.1.0 Jan 1, 2023
0.0.0 Jan 1, 2023

#10 in #particular

MIT license

3KB

Discoverer

This crate exposes a single method for recursively walking through directories to find files that match a particular extension.

Usage

Add discoverer to your Cargo.toml:

[dependencies]
discoverer = "0.2.0"

Or use cargo add discoverer

Example

use discoverer::discover;

fn main() {
    let discoveries = discover(&["txt"], &[
        &concat!(env!("CARGO_MANIFEST_DIR"), "/examples/fixtures")
    ]).unwrap();

    dbg!(discoveries);
}

Credits

Dependencies

~0.1–6.5MB
~37K SLoC