Function async_std::fs::canonicalize[][src]

pub async fn canonicalize<P: AsRef<Path>>(path: P) -> Result<PathBuf>

Returns the canonical form of a path.

The returned path is in absolute form with all intermediate components normalized and symbolic links resolved.

This function is an async version of std::fs::canonicalize.

Errors

An error will be returned in the following situations:

Examples

use async_std::fs;

let path = fs::canonicalize(".").await?;