(path: &Path)
| 9430 | } |
| 9431 | |
| 9432 | fn sorted_files(path: &Path) -> Result<Vec<PathBuf>> { |
| 9433 | let mut files = Vec::new(); |
| 9434 | for entry in WalkDir::new(path) { |
| 9435 | let entry = entry.with_context(|| format!("walk {}", path.display()))?; |
| 9436 | if entry.file_type().is_file() { |
| 9437 | files.push(entry.path().to_path_buf()); |
| 9438 | } |
| 9439 | } |
| 9440 | files.sort(); |
| 9441 | Ok(files) |
| 9442 | } |
| 9443 | |
| 9444 | fn copy_file(source: &Path, destination: &Path) -> Result<()> { |
| 9445 | ensure_file(source)?; |
no test coverage detected