Skip to main content

canonicalize_to_rcstr

Function canonicalize_to_rcstr 

Source
pub fn canonicalize_to_rcstr(path: &Path) -> Result<RcStr>
Expand description

A thin wrapper around std::fs::canonicalize that returns the result as an [RcStr].

The returned path is in the format DiskFileSystem::new expects: an absolute, symlink-resolved path (a verbatim/extended \\?\-prefixed path on Windows). path must already exist on disk. Returns an error if it cannot be canonicalized or is not valid unicode.