pub async fn download_dir() -> Result<PathBuf, Error>
Expand description
Returns the path to the user’s download directory.
§Platform-specific
- Linux: Resolves to
xdg-user-dirs
’XDG_DOWNLOAD_DIR
. - macOS: Resolves to
$HOME/Downloads
. - Windows: Resolves to
{FOLDERID_Downloads}
.
§Example
use tauri_sys::path::download_dir;
let download_dir_path = download_dir().await?;