Tauri downloadDir
downloadDir():Promise
<string
>
返回用户下载目录的路径。
特定平台
- Linux:解析为
xdg-user-dirs
XDG_DOWNLOAD_DIR
- macOS:解析为
$HOME/Downloads
- Windows:解析为
{FOLDERID_Downloads}
例
import { downloadDir } from '@tauri-apps/api/path';
const downloadDirPath = await downloadDir();
Since: 1.0.0
Returns: Promise
<string
>