Function tauri_sys::path::public_dir
source · pub async fn public_dir() -> Result<PathBuf, Error>
Expand description
Returns the path to the user’s public directory.
§Platform-specific
- Linux: Resolves to
xdg-user-dirs
’XDG_PUBLICSHARE_DIR
. - macOS: Resolves to
$HOME/Public
. - Windows: Resolves to
{FOLDERID_Public}
.
§Example
use tauri_sys::path::public_dir;
let public_dir_path = public_dir().await?;