Function tauri_sys::path::normalize

source ·
pub async fn normalize(path: &str) -> Result<PathBuf, Error>
Expand description

Normalizes the given path, resolving '..' and '.' segments and resolve symbolic links.

§Example

use tauri_sys::path::{normalize, app_data_dir};

let app_data_dir_path = app_data_dir().await?;

let path = normalize([app_data_dir_path, "..", "users", "tauri", "avatar.png"]).await?;