MCPcopy Index your code
hub / github.com/explodingcamera/tinywasm / expand_paths

Function expand_paths

crates/cli/src/wast_runner.rs:586–603  ·  view source on GitHub ↗
(paths: &[PathBuf])

Source from the content-addressed store, hash-verified

584}
585
586fn expand_paths(paths: &[PathBuf]) -> Result<Vec<PathBuf>> {
587 let mut files = Vec::new();
588 for path in paths {
589 if path.is_dir() {
590 for entry in std::fs::read_dir(path)? {
591 let entry = entry?;
592 let path = entry.path();
593 if path.extension().is_some_and(|ext| ext == "wast") {
594 files.push(path);
595 }
596 }
597 } else {
598 files.push(path.clone());
599 }
600 }
601 files.sort();
602 Ok(files)
603}
604
605#[derive(Debug)]
606pub struct TestFile<'a> {

Callers 1

run_pathsMethod · 0.85

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected