Files
2026-08-28 09:22:58 +05:30

10 lines
272 B
Rust

use std::fs;
use std::path::PathBuf;
use tauri::Manager;
pub fn app_data_dir(app: &tauri::AppHandle) -> Result<PathBuf, String> {
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)
}