glob-sl

Crates.ioglob-sl
lib.rsglob-sl
version0.4.2
sourcesrc
created_at2023-04-25 20:29:59.11299
updated_at2023-09-10 05:46:32.46687
descriptionSupport for matching file paths against Unix shell style patterns.
homepagehttps://github.com/brmmm3/glob-sl
repositoryhttps://github.com/brmmm3/glob-sl
max_upload_size
id848795
size79,211
Marty B. (brmmm3)

documentation

https://docs.rs/glob-sl/0.4.2

README

glob-sl

Support for matching file paths against Unix shell style patterns.

This crate is a fork of the glob crate. The only difference is that glob-rs add option follow_links to MatchOptions.

Build Status

Documentation

Usage

To use glob-sl, add this to your Cargo.toml:

[dependencies]
glob-sl = "0.4.2"

And add this to your crate root:

extern crate glob_sl;

Examples

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

use glob_sl::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: 186

cargo fmt