glob-sl 0.4.2

Support for matching file paths against Unix shell style patterns.
Documentation

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),
    }
}