pub fn open_file(&self, path: &Path) -> std::io::Result<File> {
        // On Windows, canonicalize is currently very broken when relative path segments appear in the middle of a
        // path, and stdlib doesn't help us out. Go via `RelativePathBuf` to clean it up.
        let absolute = conv_path(path)?.to_logical_path(&self.root_path);
        if !absolute.starts_with(&self.root_path) {
            return Err(Error::new(
                ErrorKind::Other,
                "path is outside the vfs root directory",
            ));
        }
        File::open(absolute)
    }
/// Run the file opening logic on the VFS, so that this can be reused for normal file access at the same time.
Run the file opening logic on the VFS, so that this can be reused for normal file access at the same time.
Run the file opening logic on the VFS so that this can be reused for normal file access at the same time .
pub fn open_file(&self, path: &Path) -> std::io::Result<File> {
        // On Windows, canonicalize is currently very broken when relative path segments appear in the middle of a
        // path, and stdlib doesn't help us out. Go via `RelativePathBuf` to clean it up.
        let absolute = conv_path(path)?.to_logical_path(&self.root_path);
        if !absolute.starts_with(&self.root_path) {
            return Err(Error::new(
                ErrorKind::Other,
                "path is outside the vfs root directory",
            ));
        }
        File::open(absolute)
    }
pub fn open_file ( & self , path : & Path ) -> std :: io :: Result < File > { // On Windows, canonicalize is currently very broken when relative path segments appear in the middle of a // path, and stdlib doesn't help us out. Go via `RelativePathBuf` to clean it up. let absolute = conv_path ( path ) ? . to_logical_path ( & self . root_path ) ; if ! absolute . starts_with ( & self . root_path ) { return Err ( Error :: new ( ErrorKind :: Other , " " , ) ) ; } File :: open ( absolute ) }
Run the file opening logic on the VFS, so that this can be reused for normal file access at the same time.
Run the file opening logic on the VFS so that this can be reused for normal file access at the same time .
&self
path
&Path
&self
path
&Path