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

Function collect

atomic-core/examples/compact_semantic_codec.rs:61–70  ·  view source on GitHub ↗
(path: &Path, paths: &mut Vec<PathBuf>)

Source from the content-addressed store, hash-verified

59}
60
61fn collect(path: &Path, paths: &mut Vec<PathBuf>) -> Result<()> {
62 if path.is_dir() {
63 for entry in fs::read_dir(path)? {
64 collect(&entry?.path(), paths)?;
65 }
66 } else if path.extension().is_some_and(|s| s == "change") {
67 paths.push(path.into());
68 }
69 Ok(())
70}
71
72fn measure(path: &Path, level: i32) -> Result<Row> {
73 let mut input = BufReader::new(fs::File::open(path)?);

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