Snap for 10363732 from 47b1279e334853672b04c3c6e494fb6fb8e962c4 to emu-33-release Change-Id: I4da6dd3884b48843385f1e539ff72bf4ca36b3a0
Support for matching file paths against Unix shell style patterns.
To use glob, add this to your Cargo.toml:
[dependencies] glob = "0.3.1"
And add this to your crate root:
extern crate glob;
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), } }