Returns the path to the user's data directory.
$XDG_DATA_HOME
$HOME/.local/share
$HOME/Library/Application Support
{FOLDERID_RoamingAppData}
import { dataDir } from '@tauri-apps/api/path';const dataDirPath = await dataDir(); Copy
import { dataDir } from '@tauri-apps/api/path';const dataDirPath = await dataDir();
1.0.0
Returns the path to the user's data directory.
Platform-specific
$XDG_DATA_HOME
or$HOME/.local/share
.$HOME/Library/Application Support
.{FOLDERID_RoamingAppData}
.