use std::fs; use std::path::PathBuf; use tauri::Manager; pub fn app_data_dir(app: &tauri::AppHandle) -> Result { let dir = app.path().app_data_dir().map_err(|e| e.to_string())?; fs::create_dir_all(&dir).map_err(|e| e.to_string())?; Ok(dir) }