Go to file
2019-01-17 21:41:46 -05:00
src remove unused import 2019-01-17 21:41:46 -05:00
tests can't infer type of empty vec 2016-01-23 10:56:55 -05:00
.gitignore Initial commit. 2014-08-22 15:24:47 -07:00
.travis.yml Update travis token 2016-11-19 10:15:42 -08:00
Cargo.toml Add categories to Cargo.toml 2017-01-20 11:54:32 -05:00
LICENSE-APACHE Initial commit. 2014-08-22 15:24:47 -07:00
LICENSE-MIT Initial commit. 2014-08-22 15:24:47 -07:00
README.md Add example in readme 2017-05-10 09:49:36 +02:00

glob

Support for matching file paths against Unix shell style patterns.

Build Status

Documentation

Usage

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

[dependencies]
glob = "0.2"

And add this to your crate root:

extern crate glob;

Examples

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

use glob::glob;

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