commit | c4c9f870f3643c5458bdf51e34ba83e7e47f98f2 | [log] [tgz] |
---|---|---|
author | Bob Badour <bbadour@google.com> | Fri Feb 12 17:58:43 2021 -0800 |
committer | Bob Badour <bbadour@google.com> | Fri Feb 12 17:58:43 2021 -0800 |
tree | 0ffd0f1fd4456795acd5c6f8a40f4118b8d06521 | |
parent | d89499bb06e505275cfafb4b28ba03f3b57b9ced [diff] |
[LSC] Add LOCAL_LICENSE_KINDS to external/rust/crates/glob Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-MIT to: Android.bp Bug: 68860345 Bug: 151177513 Bug: 151953481 Test: m all Exempt-From-Owner-Approval: janitorial work Change-Id: I9fe33c553b64f6f1481c3281ce629685e587c28e
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), } }