Skip to main content

canonicalize_async

Function canonicalize_async 

Source
pub async fn canonicalize_async(
    path: impl AsRef<Path> + Send,
) -> Result<PathBuf>
Expand description

Async canonicalize via dunce, using spawn_blocking to avoid blocking the runtime. Equivalent to tokio::fs::canonicalize but without the Windows \\?\ verbatim prefix. Use this in async contexts instead of the sync canonicalize when the path may require I/O.