MCPcopy Create free account
hub / github.com/codename-co/stack / list_root_files

Function list_root_files

packages/app/src-tauri/src/cli.rs:463–476  ·  view source on GitHub ↗

Lists only the files in the root of a directory (non-recursive). # Arguments `path` - A reference to the directory path # Returns `Vec ` - A vector of file paths

(path: &std::path::Path)

Source from the content-addressed store, hash-verified

461///
462/// * `Vec<std::path::PathBuf>` - A vector of file paths
463fn list_root_files(path: &std::path::Path) -> Vec<std::path::PathBuf> {
464 fs::read_dir(path)
465 .expect("Failed to read directory")
466 .filter_map(|entry| {
467 let entry = entry.expect("Failed to read entry");
468 let path = entry.path();
469 if path.is_file() {
470 Some(path)
471 } else {
472 None
473 }
474 })
475 .collect()
476}
477
478/// Runs a software stack from a stack bundle based on its flavor.
479///

Callers 1

guess_flavorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected