code: func (s *Server) OpenFile(name string, mode int32) (File, error) {
  	u := urlParse(name)
  
  	if h, ok := s.schemes[u.Scheme]; ok {
  		f, serr := h.Open(u, mode)
  		if serr != os.ErrNotExist {
  			return f, serr
  		}
  	}
  
  	switch mode {
  	case OpenModeReadOnly:
  		return os.Open(filepath.Clean(name))
  	case OpenModeWriteOnly:
  		flag := os.O_WRONLY | os.O_CREATE | os.O_TRUNC
  		return os.OpenFile(name, flag, 0600)
  	default:
  		return nil, &Status{
  			Err:  fmt.Errorf("open mode(%d) not supported for file %q", mode, name),
  			Code: StatusAccessDenied,
  		}
  	}
  }
docs: // OpenFile selects the File implementation based on file type and mode.