code: func (n *roFile) Open(ctx context.Context, req *fuse.OpenRequest, res *fuse.OpenResponse) (fs.Handle, error) {
  	roFileOpen.Incr()
  
  	if isWriteFlags(req.Flags) {
  		return nil, fuse.EPERM
  	}
  
  	Logger.Printf("roFile.Open: %v: content: %v dir=%v flags=%v", n.permanode, n.content, req.Dir, req.Flags)
  	r, err := schema.NewFileReader(ctx, n.fs.fetcher, n.content)
  	if err != nil {
  		roFileOpenError.Incr()
  		Logger.Printf("roFile.Open: %v", err)
  		return nil, fuse.EIO
  	}
  
  	// Turn off the OpenDirectIO bit (on by default in rsc fuse server.go),
  	// else append operations don't work for some reason.
  	res.Flags &= ^fuse.OpenDirectIO
  
  	// Read-only.
  	nod := &node{
  		fs:      n.fs,
  		blobref: n.content,
  	}
  	return &nodeReader{n: nod, fr: r}, nil
  }
docs: // Empirically:
  //  open for read:   req.Flags == 0
  //  open for append: req.Flags == 1
  //  open for write:  req.Flags == 1
  //  open for read/write (+<)   == 2 (bitmask? of?)
  //
  // open flags are O_WRONLY (1), O_RDONLY (0), or O_RDWR (2). and also
  // bitmaks of O_SYMLINK (0x200000) maybe. (from
  // fuse_filehandle_xlate_to_oflags in macosx/kext/fuse_file.h)