Function tauri_sys::path::download_dir

source ·
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-dirsXDG_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?;