Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
In [2]:
:sccache 1
:dep glob = "0.3.0"
Out[2]:
In [15]:
use std::fs::DirEntry;
use std::path::PathBuf;
use glob::glob;
In [4]:
for entry in glob("./**/*").unwrap() {
if let Ok(entry) = entry {
println!("{:?}", entry);
}
}
Out[4]:
Collect valid paths matching a pattern into a vector.
In [25]:
let paths: Vec<PathBuf> = glob("./**/*").unwrap().flatten().collect();
paths
Out[25]:
In [26]:
paths.len()
Out[26]:
In [ ]: