#find #file #folders #search

yanked file-matcher-rs

A library to search files based on the name pattern (regex, wildmatch, exact)

0.2.3 Jul 16, 2021
0.2.2 Jul 16, 2021
0.2.1 Jul 16, 2021
0.2.0 Jul 16, 2021
0.1.0 Jul 16, 2021

#44 in #folders

MIT license

16KB
402 lines

file-matcher-rs

A Rust library to search files based on the name pattern (regex, wildcard, exact).

Examples

Use FileNamed to search for exactly one file matching the name pattern. Returns an Error if none or more than one file was found.

FileNamed::regex("cat.*")
    .within("tests/assets")
    .find()?

Use FilesNamed to find any amount of files matching the name pattern.

FilesNamed::wildmatch("*.txt")
    .within("tests/assets")
    .find()?

Dependencies

~0–510KB