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

Function watch_dir

crates/os-runtime/build.rs:25–37  ·  view source on GitHub ↗
(dir: &Path)

Source from the content-addressed store, hash-verified

23 collect_tree(&manifest_dir.join(dir), &manifest_dir, &mut tree);
24 }
25 tree.sort_by(|a, b| a.key.cmp(&b.key));
26
27 let mut code = render_sources(&sources);
28 code.push_str(&render_tree(&tree));
29 fs::write(out_dir.join("sources.rs"), code).expect("write sources.rs");
30}
31
32fn watch_dir(dir: &Path) {
33 let Ok(entries) = fs::read_dir(dir) else {
34 return;
35 };
36 for entry in entries.flatten() {
37 let path = entry.path();
38 if path.is_dir() {
39 watch_dir(&path);
40 } else {

Callers 1

mainFunction · 0.85

Calls 1

pathMethod · 0.80

Tested by

no test coverage detected