tauri_sys::path

Function home_dir

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

Returns the path to the user’s home directory.

§Platform-specific
  • Linux: Resolves to $HOME.
  • macOS: Resolves to $HOME.
  • Windows: Resolves to {FOLDERID_Profile}.

§Example

use tauri_sys::path::home_dir;

let home_dir_path = home_dir().await?;