pub async fn data_dir() -> Result<PathBuf, Error>Expand description
Returns the path to the user’s data directory.
§Platform-specific
- Linux: Resolves to
$XDG_DATA_HOMEor$HOME/.local/share. - macOS: Resolves to
$HOME/Library/Application Support. - Windows: Resolves to
{FOLDERID_RoamingAppData}.
§Example
use tauri_sys::path::data_dir;
let data_dir_path = data_dir().await?;