func (w *Writes) Write(req *fuse.WriteRequest, resp *fuse.WriteResponse, intr fs.Intr) fuse.Error { n, err := w.buf.Write(req.Data) resp.Size = n if err != nil { // TODO hiding error return fuse.EIO } return nil }
func (benchFile) Write(req *fuse.WriteRequest, resp *fuse.WriteResponse, intr fs.Intr) fuse.Error { resp.Size = len(req.Data) return nil }
func (f *inMemoryFile) Write(req *fuse.WriteRequest, resp *fuse.WriteResponse, intr fs.Intr) fuse.Error { resp.Size = copy(f.data[req.Offset:], req.Data) return nil }