file-matcher-rs

Crates.iofile-matcher-rs
lib.rsfile-matcher-rs
version0.2.3
sourcesrc
created_at2021-07-16 16:04:49.515208
updated_at2021-07-16 18:41:51.245442
descriptionA library to search files based on the name pattern (regex, wildmatch, exact)
homepagehttps://github.com/feenkcom/file-matcher-rs
repositoryhttps://github.com/feenkcom/file-matcher-rs
max_upload_size
id423693
size25,029
Aliaksei Syrel (syrel)

documentation

README

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()?
Commit count: 19

cargo fmt