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

Function redb_files

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

Every redb file under `dir`.

(dir: &Path)

Source from the content-addressed store, hash-verified

277
278/// Every redb file under `dir`.
279fn 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.

Calls 5

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

Tested by

no test coverage detected