matrix-authentication-service/.gear/predownloaded-development/vendor/glob
2026-03-07 01:41:31 +03:00
..
.github added rust vendor 2026-03-07 01:41:31 +03:00
src added rust vendor 2026-03-07 01:41:31 +03:00
tests added rust vendor 2026-03-07 01:41:31 +03:00
.cargo-checksum.json added rust vendor 2026-03-07 01:41:31 +03:00
.cargo_vcs_info.json added rust vendor 2026-03-07 01:41:31 +03:00
Cargo.lock added rust vendor 2026-03-07 01:41:31 +03:00
Cargo.toml added rust vendor 2026-03-07 01:41:31 +03:00
Cargo.toml.orig added rust vendor 2026-03-07 01:41:31 +03:00
CHANGELOG.md added rust vendor 2026-03-07 01:41:31 +03:00
LICENSE-APACHE added rust vendor 2026-03-07 01:41:31 +03:00
LICENSE-MIT added rust vendor 2026-03-07 01:41:31 +03:00
README.md added rust vendor 2026-03-07 01:41:31 +03:00
triagebot.toml added rust vendor 2026-03-07 01:41:31 +03:00

glob

Support for matching file paths against Unix shell style patterns.

Continuous integration

Documentation

Usage

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

[dependencies]
glob = "0.3.2"

If you're using Rust 1.30 or earlier, or edition 2015, 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),
    }
}