pub fn open_no_follow(path: &Path) -> Result<File>Expand description
Open path for reading, refusing a symlink where the OS can: a copy
reads the file that was listed, never what a link swapped in since
points at (spec §9: never follow a link when copying).
Unix refuses with O_NOFOLLOW. Windows opens normally: the flag that
would refuse a link there (FILE_FLAG_OPEN_REPARSE_POINT) also opens a
cloud placeholder (OneDrive) without fetching its contents. The caller
checks the opened file’s own type either way.