MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / redb_files

Function redb_files

atomic-cli/tests/it/remote_sandbox_client_test.rs:282–296  ·  view source on GitHub ↗

Every redb file under `dir`.

(dir: &Path)

Source from the content-addressed store, hash-verified

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

Calls 5

is_dirMethod · 0.80
extensionMethod · 0.80
unwrapMethod · 0.45
pathMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected