Function tauri_sys::path::cache_dir

source ·
pub async fn cache_dir() -> Result<PathBuf, Error>
Expand description

Returns the path to the user’s cache directory.

§Platform-specific
  • Linux: Resolves to $XDG_CACHE_HOME or $HOME/.cache.
  • macOS: Resolves to $HOME/Library/Caches.
  • Windows: Resolves to {FOLDERID_LocalAppData}.

§Example

use tauri_sys::path::cache_dir;

let cache_dir_path = cache_dir().await?;