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

Function collect

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

Source from the content-addressed store, hash-verified

166}
167
168fn collect(path: &Path, out: &mut Vec<PathBuf>) -> Result<()> {
169 if path.is_dir() {
170 for entry in fs::read_dir(path)? {
171 let p = entry?.path();
172 if !p.is_symlink() {
173 collect(&p, out)?;
174 }
175 }
176 } else if path.extension().is_some_and(|s| s == "change") {
177 out.push(path.into());
178 }
179 Ok(())
180}
181fn main() -> Result<()> {
182 let source = std::env::args()
183 .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