android13/external/rust/crates/glob
liiir1985 7f62dcda9f initial 2024-06-22 20:45:49 +08:00
..
src initial 2024-06-22 20:45:49 +08:00
tests initial 2024-06-22 20:45:49 +08:00
.cargo_vcs_info.json initial 2024-06-22 20:45:49 +08:00
.travis.yml initial 2024-06-22 20:45:49 +08:00
Android.bp initial 2024-06-22 20:45:49 +08:00
Cargo.toml initial 2024-06-22 20:45:49 +08:00
Cargo.toml.orig initial 2024-06-22 20:45:49 +08:00
LICENSE initial 2024-06-22 20:45:49 +08:00
LICENSE-APACHE initial 2024-06-22 20:45:49 +08:00
LICENSE-MIT initial 2024-06-22 20:45:49 +08:00
METADATA initial 2024-06-22 20:45:49 +08:00
MODULE_LICENSE_APACHE2 initial 2024-06-22 20:45:49 +08:00
OWNERS initial 2024-06-22 20:45:49 +08:00
README.md initial 2024-06-22 20:45:49 +08:00
TEST_MAPPING initial 2024-06-22 20:45:49 +08:00
cargo2android.json initial 2024-06-22 20:45:49 +08:00

README.md

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

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