Lines Matching refs:glob
13 //! The `glob` and `glob_with` functions allow querying the filesystem for all
14 //! files that match a particular pattern (similar to the libc `glob` function).
21 //! `glob`/`fnmatch` functions.
28 //! use glob::glob;
30 //! for entry in glob("/media/**/*.jpg").expect("Failed to read glob pattern") {
43 //! use glob::glob_with;
44 //! use glob::MatchOptions;
61 html_root_url = "https://docs.rs/glob/0.3.1"
93 /// See the `glob` function for more details.
128 /// use glob::glob;
130 /// for entry in glob("/media/pictures/*.jpg").unwrap() {
152 /// use glob::glob;
155 /// for path in glob("/media/pictures/*.jpg").unwrap().filter_map(Result::ok) {
160 pub fn glob(pattern: &str) -> Result<Paths, PatternError> {
267 /// A glob iteration error.
270 /// to determine if its contents match the glob pattern. This is possible
322 /// An alias for a glob iteration result.
324 /// This represents either a matched path or a glob iteration error,
333 // point rather than in glob() so that the errors are unified that is,
335 // iterator (i.e. glob()) only fails if it fails to compile the Pattern
498 /// Show the original glob pattern.
544 /// An invalid glob pattern will yield a `PatternError`.
686 /// use glob::Pattern;
717 /// Access the original glob pattern.
1024 use super::{glob, MatchOptions, Pattern};
1056 assert!(glob("a/**b").err().unwrap().pos == 4);
1057 assert!(glob("abc[def").err().unwrap().pos == 3);
1067 let mut iter = glob("/root/*").unwrap();
1083 assert!(glob("/").unwrap().next().is_some());
1084 assert!(glob("//").unwrap().next().is_some());
1087 assert!(glob("/*").unwrap().next().is_some());
1112 assert!(glob(root_with_device.as_os_str().to_str().unwrap())
1190 glob("/*/*/*/*").unwrap().skip(10000).next();