Function
collect
(path: &Path, out: &mut Vec<PathBuf>)
Source from the content-addressed store, hash-verified
| 166 | } |
| 167 | |
| 168 | fn 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 | } |
| 181 | fn main() -> Result<()> { |
| 182 | let source = std::env::args() |
| 183 | .nth(1) |
Tested by
no test coverage detected