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

Function cleanup_sanitize_dir

src/execution/sanitize.rs:358–374  ·  view source on GitHub ↗
(sanitize_dir: &Path)

Source from the content-addressed store, hash-verified

356 }
357
358 pub fn cleanup_sanitize_dir(sanitize_dir: &Path) -> Result<()> {
359 let files = crate::deopt::utils::read_sort_dir(sanitize_dir)?;
360 for file in files {
361 if let Some(ext) = file.extension() {
362 if ext == "log" || ext == "out" || ext == "cc" || ext == "profdata" || ext == "cost"
363 {
364 continue;
365 }
366 }
367 if file.is_dir() {
368 let _ = std::fs::remove_dir_all(file);
369 } else {
370 let _ = std::fs::remove_file(file);
371 }
372 }
373 Ok(())
374 }
375}
376
377#[cfg(test)]

Callers 1

Calls 1

read_sort_dirFunction · 0.85

Tested by

no test coverage detected