func (n *nodeReadNode) Read(file File, dest []byte, off int64, context *fuse.Context) (fuse.ReadResult, fuse.Status) { e := off + int64(len(dest)) if int(e) > len(n.data) { e = int64(len(n.data)) } return fuse.ReadResultData(n.data[off:int(e)]), fuse.OK }
func (f *MutableDataFile) Read(buf []byte, off int64) (fuse.ReadResult, fuse.Status) { end := int(off) + len(buf) if end > len(f.data) { end = len(f.data) } return fuse.ReadResultData(f.data[off:end]), fuse.OK }
func (f *dataFile) Read(buf []byte, off int64) (res fuse.ReadResult, code fuse.Status) { end := int(off) + int(len(buf)) if end > len(f.data) { end = len(f.data) } return fuse.ReadResultData(f.data[off:end]), fuse.OK }
func (f *dataFile) Read(buf []byte, off int64) (res fuse.ReadResult, code fuse.Status) { // f.data = []byte("BNJ") log.Print("Read()", " ", len(buf)) end := int(off) + int(len(buf)) if end > len(f.data) { end = len(f.data) } return fuse.ReadResultData(f.data[off:end]), fuse.OK }
func (f *devNullFile) Read(buf []byte, off int64) (fuse.ReadResult, fuse.Status) { return fuse.ReadResultData(nil), fuse.OK }