File operations

This commit is contained in:
Barak Michener 2018-03-31 16:58:46 -07:00
parent 4015bc3896
commit 892908fcf5
5 changed files with 260 additions and 8 deletions

View file

@ -30,6 +30,7 @@ func (f *WsFsFile) Read(buf []byte, off int64) (fuse.ReadResult, fuse.Status) {
Method: MethodFileRead,
FileHandle: f.h,
Offset: off,
Size: uint32(len(buf)),
}
resp, ok := f.fs.getResponse(&r)
if !ok {
@ -155,6 +156,7 @@ func (f *WsFsFile) Allocate(off uint64, size uint64, mode uint32) (code fuse.Sta
FileHandle: f.h,
Mode: mode,
Size: uint32(size),
Offset: int64(off),
}
resp, ok := f.fs.getResponse(&r)
if !ok {