// Ropen opens the file associated with fid
Ropen opens the file associated with fid
// Ropen opens the file associated with fid
func (fs *fileServer) Ropen(fid protocol.FID, mode protocol.Mode) (protocol.QID, protocol.MaxSize, error) {
	if mode&(protocol.OTRUNC|protocol.ORCLOSE|protocol.OAPPEND) != 0 {
		return protocol.QID{}, 0, ErrPermission
	}
	switch mode & 3 {
	case protocol.OWRITE, protocol.ORDWR:
		return protocol.QID{}, 0, ErrPermission
	}
	f, err := fs.getFile(fid)
	if err != nil {
		return protocol.QID{}, 0, ErrFileNotFound
	}
	return getQid(f), fs.ioUnit, nil
}
func ( fs * fileServer ) Ropen ( fid protocol . FID , mode protocol . Mode ) ( protocol . QID , protocol . MaxSize , error ) { if mode & ( protocol . OTRUNC | protocol . ORCLOSE | protocol . OAPPEND ) != 0 { return protocol . QID { } , 0 , ErrPermission } switch mode & 3 { case protocol . OWRITE , protocol . ORDWR : return protocol . QID { } , 0 , ErrPermission } f , err := fs . getFile ( fid ) if err != nil { return protocol . QID { } , 0 , ErrFileNotFound } return getQid ( f ) , fs . ioUnit , nil }
Ropen opens the file associated with fid
Ropen opens the file associated with fid
// Lookup the parent fid // TODO Check executable