(path: &PathBuf)
| 5 | |
| 6 | pub(crate) fn ensure_dir_exists(path: &PathBuf) { |
| 7 | if !path.exists() { |
| 8 | fs::create_dir_all(path).unwrap_or_else(|_| panic!("Failed to create directory at {path:?}")); |
| 9 | } |
| 10 | } |
| 11 | |
| 12 | pub(crate) fn clear_dir(path: &PathBuf) { |
| 13 | let Ok(entries) = fs::read_dir(path) else { |
| 14 | tracing::error!("Failed to read directory at {path:?}"); |
no test coverage detected