Skip to main content

to_verbatim_with_case_folded_disk

Function to_verbatim_with_case_folded_disk 

Source
pub fn to_verbatim_with_case_folded_disk(path: &Path) -> Result<PathBuf>
Expand description

Converts path into the verbatim, drive-letter-case-folded representation used internally by crate::DiskFileSystem on Windows.

This is the purely lexical counterpart to std::fs::canonicalize: to_verbatim (GetFullPathNameW) makes the path absolute and verbatim (\\?\-prefixed) but, unlike canonicalize, does not touch the disk — it resolves neither symlinks nor 8.3 short names. The drive letter is then upper-cased to match the form GetFinalPathNameByHandle (and thus canonicalize) produces.

No-op on non-Windows platforms (returns path unchanged).