Skip to main content

canonical_for_write

Function canonical_for_write 

Source
pub fn canonical_for_write(root: &Path, rel: &str) -> Result<String, Refused>
Expand description

The file a write of rel reaches, workspace-relative: every existing ancestor’s symlinks resolved (they must stay inside root, which is canonical), the components that do not exist yet appended as written, and the target itself never a symlink. Every component that exists is named as the volume stores it, so on a case-insensitive volume Speccoder.toml answers speccoder.toml. Two spellings that reach the same file give the same answer; the same spelling after a directory was swapped for a symlink gives another.