Debian Codegraph @

debian/rust-vendor/glob/README.md

raw
1 glob
2 ====
3
4 Support for matching file paths against Unix shell style patterns.
5
6 [![Continuous integration](https://github.com/rust-lang/glob/actions/workflows/rust.yml/badge.svg)](https://github.com/rust-lang/glob/actions/workflows/rust.yml)
7
8 [Documentation](https://docs.rs/glob)
9
10 ## Usage
11
12 To use `glob`, add this to your `Cargo.toml`:
13
14 ```toml
15 [dependencies]
16 glob = "0.3.2"
17 ```
18
19 ## Examples
20
21 Print all jpg files in /media/ and all of its subdirectories.
22
23 ```rust
24 use glob::glob;
25
26 for entry in glob("/media/**/*.jpg").expect("Failed to read glob pattern") {
27 match entry {
28 Ok(path) => println!("{:?}", path.display()),
29 Err(e) => println!("{:?}", e),
30 }
31 }
32 ```