pub async fn desktop_dir() -> Result<PathBuf, Error>Expand description
Returns the path to the user’s desktop directory.
§Platform-specific
- Linux: Resolves to
xdg-user-dirs’XDG_DESKTOP_DIR. - macOS: Resolves to
$HOME/Desktop. - Windows: Resolves to
{FOLDERID_Desktop}.
§Example
use tauri_sys::path::desktop_dir;
let desktop_dir_path = desktop_dir().await?;