Every redb file under `dir`.
(dir: &Path)
| 277 | |
| 278 | /// Every redb file under `dir`. |
| 279 | fn redb_files(dir: &Path) -> Vec<PathBuf> { |
| 280 | let mut out = Vec::new(); |
| 281 | let mut stack = vec![dir.to_path_buf()]; |
| 282 | while let Some(d) = stack.pop() { |
| 283 | for entry in std::fs::read_dir(&d).unwrap() { |
| 284 | let path = entry.unwrap().path(); |
| 285 | if path.is_dir() { |
| 286 | stack.push(path); |
| 287 | } else if path.extension().is_some_and(|e| e == "redb") { |
| 288 | out.push(path); |
| 289 | } |
| 290 | } |
| 291 | } |
| 292 | out |
| 293 | } |
| 294 | |
| 295 | /// Nothing in the sandbox but its pointer, its tree, and its cache: no |
| 296 | /// repository database outside the cache, ever. |
no test coverage detected