MCPcopy Create free account
hub / github.com/FuzzAnything/PromptFuzz / read_all_files_in_dir

Function read_all_files_in_dir

src/deopt.rs:713–724  ·  view source on GitHub ↗

Recursively read all files in this dir.

(dir: &Path)

Source from the content-addressed store, hash-verified

711
712 /// Recursively read all files in this dir.
713 pub fn read_all_files_in_dir(dir: &Path) -> Result<Vec<PathBuf>> {
714 let mut files = Vec::new();
715 for entry in std::fs::read_dir(dir).context(format!("cannot open dir: {dir:?}"))? {
716 let entry = entry?.path();
717 if entry.is_file() {
718 files.push(entry);
719 } else if entry.is_dir() {
720 files.extend(read_all_files_in_dir(&entry)?);
721 }
722 }
723 Ok(files)
724 }
725
726 /// get the build static library linked with sanitizers
727 pub fn get_san_lib_path(deopt: &Deopt) -> &'static PathBuf {

Callers 9

get_library_corpus_filesFunction · 0.85
copy_corpusFunction · 0.85
get_library_dep_treesFunction · 0.85
find_testbed_corporaFunction · 0.85
execute_poolMethod · 0.85
parse_header_astMethod · 0.85

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected