commit | 2d3195246d9b9d74d4b9717555c201d2dd5e2d5d | [log] [tgz] |
---|---|---|
author | Linux Build Service Account <lnxbuild@localhost> | Sun Jan 16 14:29:25 2022 -0800 |
committer | Linux Build Service Account <lnxbuild@localhost> | Sun Jan 16 14:29:25 2022 -0800 |
tree | 28ded3e268f7970c9b9a5b9e1dfed07c37063f29 | |
parent | 2caef5b9fc140cc7a114ad4ea9af5d0ff7e02ba6 [diff] | |
parent | bda55c6400f2db8e4f3b99c7caedcd97f9b48839 [diff] |
Merge bda55c6400f2db8e4f3b99c7caedcd97f9b48839 on remote branch Change-Id: Ib84c4689f42d6e0efe371e7184e79fc1a0b99414
Support for matching file paths against Unix shell style patterns.
To use glob
, add this to your Cargo.toml
:
[dependencies] glob = "0.3.0"
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), } }