Skip to content
Tauri

desktopDir

desktopDir(): Promise<string>

Defined in: path.ts:286

Returns the path to the user’s desktop directory.

  • Linux: Resolves to xdg-user-dirsXDG_DESKTOP_DIR.
  • macOS: Resolves to $HOME/Desktop.
  • Windows: Resolves to {FOLDERID_Desktop}.

Promise<string>

import { desktopDir } from '@tauri-apps/api/path';
const desktopPath = await desktopDir();

1.0.0


© 2025 Tauri Contributors. CC-BY / MIT