1 2 3 4 5 6 7 8
use std::path::Path; pub fn ensure_dir_exists(dir: &Path) -> anyhow::Result<()> { if !dir.exists() { std::fs::create_dir_all(dir)?; } Ok(()) }