globetter

Crates.ioglobetter
lib.rsglobetter
version0.2.0
sourcesrc
created_at2022-10-04 10:18:54.13571
updated_at2022-12-02 13:49:56.25488
descriptionGlob fork with bug fixes! Support for matching file paths against Unix shell style patterns.
homepagehttps://github.com/mtkennerly/globetter
repositoryhttps://github.com/mtkennerly/globetter
max_upload_size
id679742
size88,328
Matthew Kennerly (mtkennerly)

documentation

https://docs.rs/globetter

README

Globetter

This is a minimal fork of the Glob crate. As of 2022-10-04, its last release was 2019-03-07, and there are some outstanding defects. This fork is intended as a drop-in replacement for bug fixes, detailed in the changelog and releases page.

Support for matching file paths against Unix shell style patterns.

Documentation

Usage

To use globetter, add it to your project by running cargo add globetter.

Examples

Print all jpg files in /media/ and all of its subdirectories.

use globetter::glob;

for entry in glob("/media/**/*.jpg").expect("Failed to read glob pattern") {
    match entry {
        Ok(path) => println!("{:?}", path.display()),
        Err(e) => println!("{:?}", e),
    }
}
Commit count: 196

cargo fmt