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

Function collect

atomic-core/examples/semantic_codec_lab.rs:450–462  ·  view source on GitHub ↗
(path: &Path, out: &mut Vec<PathBuf>)

Source from the content-addressed store, hash-verified

448 })
449}
450fn collect(path: &Path, out: &mut Vec<PathBuf>) -> Result<()> {
451 if path.is_dir() {
452 for entry in fs::read_dir(path)? {
453 let p = entry?.path();
454 if !p.is_symlink() {
455 collect(&p, out)?;
456 }
457 }
458 } else if path.extension().is_some_and(|s| s == "change") {
459 out.push(path.into());
460 }
461 Ok(())
462}
463fn main() -> Result<()> {
464 let source = std::env::args()
465 .nth(1)

Callers 1

mainFunction · 0.70

Calls 4

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

Tested by

no test coverage detected