pub fn open_file_or_dir(
root: Option<&Dir>,
path: &Path,
opts: &OpenOptions,
) -> Result<Either<File, Dir>>Expand description
Open something for which we don’t know ahead of time whether it is a file or a directory.
Note that on Windows hosts, custom_flags is ignored if root is Some!