MCPcopy Create free account
hub / github.com/LPC4/Full-Stack / collect_hll_files

Function collect_hll_files

tests/integration/compiler_suite.rs:13–24  ·  view source on GitHub ↗

Recursively collect all .hll files from a directory tree

(dir: &PathBuf, files: &mut Vec<PathBuf>)

Source from the content-addressed store, hash-verified

11
12fn collect_hll_files(dir: &PathBuf, files: &mut Vec<PathBuf>) {
13 if let Ok(entries) = fs::read_dir(dir) {
14 for entry in entries.filter_map(Result::ok) {
15 let path = entry.path();
16 if path.is_dir() {
17 collect_hll_files(&path, files);
18 } else if path.extension().and_then(|e| e.to_str()) == Some("hll") {
19 files.push(path);
20 }
21 }
22 }
23}
24
25#[test]
26fn execute_compiler_test_suite() {
27 let root = suite_root();

Callers 1

Calls 2

pathMethod · 0.80
pushMethod · 0.80

Tested by 1