(base: &Path, directory: &Path, output: &mut Vec<String>, depth: usize)
| 303 | } |
| 304 | |
| 305 | fn collect_files(base: &Path, directory: &Path, output: &mut Vec<String>, depth: usize) { |
| 306 | if depth > 8 { |
| 307 | return; |
| 308 | } |
| 309 | let Ok(entries) = std::fs::read_dir(directory) else { |
| 310 | return; |
| 311 | }; |
| 312 | for entry in entries.flatten() { |
| 313 | let path = entry.path(); |
| 314 | if path.is_dir() { |
| 315 | collect_files(base, &path, output, depth + 1); |
| 316 | } else { |
| 317 | let relative = path |
| 318 | .strip_prefix(base) |
| 319 | .map(Path::to_string_lossy) |
| 320 | .unwrap_or_default(); |
| 321 | output.push(relative.replace('\\', "/")); |
| 322 | } |
| 323 | } |
| 324 | } |
| 325 | |
| 326 | fn stage_code_string(code: StageCode) -> String { |
| 327 | code.glyph().to_string() |
no test coverage detected