pub async fn document_dir() -> Result<PathBuf, Error>
Expand description
Returns the path to the user’s document directory.
§Platform-specific
- Linux: Resolves to
xdg-user-dirs
’XDG_DOCUMENTS_DIR
. - macOS: Resolves to
$HOME/Documents
. - Windows: Resolves to
{FOLDERID_Documents}
.
§Example
use tauri_sys::path::document_dir;
let document_dir_path = document_dir().await?;