Bug: 153119942

Clone this repo:
  1. 72a68b7 Migrate 25 crates to monorepo. am: 09b25db44c by James Farrell · 5 months ago main master
  2. 09b25db Migrate 25 crates to monorepo. by James Farrell · 5 months ago main-16k
  3. 894ad88 Merge "Update Android.bp by running cargo_embargo" into main am: 9dc25dabaf by Treehugger Robot · 6 months ago
  4. 9dc25da Merge "Update Android.bp by running cargo_embargo" into main by Treehugger Robot · 6 months ago
  5. 4076251 Cleanup license metadata in external/rust/crates/glob. am: d4118939d7 by Wei Li · 6 months ago

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.1"

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