Support for matching file paths against Unix shell style patterns.
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Reynard User 543db5a7df
Some checks failed
CI / Tests-8 (push) Has been cancelled
CI / Tests-9 (push) Has been cancelled
CI / Tests-10 (push) Has been cancelled
CI / Tests-11 (push) Has been cancelled
CI / Tests-12 (push) Has been cancelled
CI / Clippy (push) Has been cancelled
CI / Check building with the MSRV (push) Has been cancelled
CI / Rustfmt (push) Has been cancelled
Release-plz / Release-plz (push) Has been cancelled
CI / Tests (push) Has been cancelled
CI / Tests-1 (push) Has been cancelled
CI / Tests-2 (push) Has been cancelled
CI / Tests-3 (push) Has been cancelled
CI / Tests-4 (push) Has been cancelled
CI / Tests-5 (push) Has been cancelled
CI / Tests-6 (push) Has been cancelled
CI / Tests-7 (push) Has been cancelled
CI / success (push) Has been cancelled
chore: sync dependencies (monorepo)
2026-04-06 15:21:03 +02:00
.github Bump actions/checkout from 5 to 6 (#184) 2025-12-02 02:11:44 -05:00
src Cache filename for sorting in fill_todo (#181) 2025-11-13 17:09:43 +00:00
tests Replace tempdir with tempfile (#176) 2025-09-17 16:11:09 -04:00
.gitignore Initial commit. 2014-08-22 15:24:47 -07:00
Cargo.toml chore: sync dependencies (monorepo) 2026-04-06 15:21:03 +02:00
CHANGELOG.md chore: release v0.3.3 (#155) 2025-08-11 09:45:06 +00: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 Fix version numbers and some formatting 2025-01-04 18:21:13 -05:00
triagebot.toml Add triagebot configuration 2020-03-31 17:07:53 -04: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),
    }
}