Tauri dataDir
dataDir():Promise
<string
>
返回用户数据目录的路径。
特定于平台
- Linux:解析为
$XDG_DATA_HOME
$HOME/.local/share
- macOS:解析为
$HOME/Library/Application Support
- windows:解析为
{FOLDERID_RoamingAppData}
例
import { dataDir } from '@tauri-apps/api/path';
const dataDirPath = await dataDir();
Since: 1.0.0
Returns: Promise
<string
>