Returns the path to the suggested directory for your app's config files.
Resolves to ${configDir}/${bundleIdentifier}, where bundleIdentifier is the identifier value configured in tauri.conf.json.
Returns the path to the suggested directory for your app's data files.
Resolves to ${dataDir}/${bundleIdentifier}, where bundleIdentifier is the identifier value configured in tauri.conf.json.
Returns the path to the suggested directory for your app's local data files.
Resolves to ${localDataDir}/${bundleIdentifier}, where bundleIdentifier is the identifier value configured in tauri.conf.json.
Returns the path to the suggested directory for your app's log files.
${configDir}/${bundleIdentifier}/logs.${homeDir}/Library/Logs/{bundleIdentifier}${configDir}/${bundleIdentifier}/logs.Returns the path to the user's audio directory.
xdg-user-dirs' XDG_MUSIC_DIR.$HOME/Music.{FOLDERID_Music}.Returns the last portion of a path. Trailing directory separators are ignored.
Optionalext: stringAn optional file extension to be removed from the returned path.
Returns the path to the user's desktop directory.
xdg-user-dirs' XDG_DESKTOP_DIR.$HOME/Desktop.{FOLDERID_Desktop}.Returns the directory name of a path. Trailing directory separators are ignored.
Returns the path to the user's document directory.
import { documentDir } from '@tauri-apps/api/path';
const documentDirPath = await documentDir();
xdg-user-dirs' XDG_DOCUMENTS_DIR.$HOME/Documents.{FOLDERID_Documents}.Returns the path to the user's download directory.
xdg-user-dirs' XDG_DOWNLOAD_DIR.$HOME/Downloads.{FOLDERID_Downloads}.Joins all given path segments together using the platform-specific separator as a delimiter, then normalizes the resulting path.
Normalizes the given path, resolving '..' and '.' segments and resolve symbolic links.
Returns the path to the user's picture directory.
xdg-user-dirs' XDG_PICTURES_DIR.$HOME/Pictures.{FOLDERID_Pictures}.Returns the path to the user's public directory.
xdg-user-dirs' XDG_PUBLICSHARE_DIR.$HOME/Public.{FOLDERID_Public}.Resolves a sequence of paths or path segments into an absolute path.
Resolve the path to a resource file.
The path to the resource.
Must follow the same syntax as defined in tauri.conf.json > bundle > resources, i.e. keeping subfolders and parent dir components (../).
The full path to the resource.
Returns the path to the application's resource directory.
To resolve a resource path, see the [[resolveResource | resolveResource API]].
Returns the path to the user's template directory.
xdg-user-dirs' XDG_TEMPLATES_DIR.{FOLDERID_Templates}.Returns the path to the user's video directory.
xdg-user-dirs' XDG_VIDEOS_DIR.$HOME/Movies.{FOLDERID_Videos}.
Returns the path to the suggested directory for your app's cache files. Resolves to
${cacheDir}/${bundleIdentifier}, wherebundleIdentifieris theidentifiervalue configured intauri.conf.json.