Skip to content

Instantly share code, notes, and snippets.

@ryanstout
Created December 18, 2014 21:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryanstout/c3911fe911f51b6cb672 to your computer and use it in GitHub Desktop.
Save ryanstout/c3911fe911f51b6cb672 to your computer and use it in GitHub Desktop.
func (fh *FileHandle) Write(req *fuse.WriteRequest, resp *fuse.WriteResponse, intr fs.Intr) fuse.Error {
// fmt.Printf("Write %s - %d at %d\n", fh.FuseFile.Path, len(req.Data), req.Offset)
fh.WrittenTo = true
size, err := fh.File.WriteAt(req.Data, req.Offset)
resp.Size = size
if err != nil {
fmt.Printf("Write Error: %s\n", err)
}
return err
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment