Updated the FileSystem interface.

geesefs-0-30-9
Aaron Jacobs 2015-06-05 14:13:59 +10:00
parent 3d04b93c8e
commit 48571ab6cb
1 changed files with 22 additions and 21 deletions

View File

@ -33,31 +33,32 @@ var fRandomDelays = flag.Bool(
// loop" that switches on op types, instead receiving typed method calls // loop" that switches on op types, instead receiving typed method calls
// directly. // directly.
// //
// Each method is responsible for calling Respond on the supplied op. // The FileSystem implementation should not call Op.Respond, instead returning
// the error with which the caller should respond.
// //
// See NotImplementedFileSystem for a convenient way to embed default // See NotImplementedFileSystem for a convenient way to embed default
// implementations for methods you don't care about. // implementations for methods you don't care about.
type FileSystem interface { type FileSystem interface {
Init(*fuseops.InitOp) Init(*fuseops.InitOp) error
LookUpInode(*fuseops.LookUpInodeOp) LookUpInode(*fuseops.LookUpInodeOp) error
GetInodeAttributes(*fuseops.GetInodeAttributesOp) GetInodeAttributes(*fuseops.GetInodeAttributesOp) error
SetInodeAttributes(*fuseops.SetInodeAttributesOp) SetInodeAttributes(*fuseops.SetInodeAttributesOp) error
ForgetInode(*fuseops.ForgetInodeOp) ForgetInode(*fuseops.ForgetInodeOp) error
MkDir(*fuseops.MkDirOp) MkDir(*fuseops.MkDirOp) error
CreateFile(*fuseops.CreateFileOp) CreateFile(*fuseops.CreateFileOp) error
CreateSymlink(*fuseops.CreateSymlinkOp) CreateSymlink(*fuseops.CreateSymlinkOp) error
RmDir(*fuseops.RmDirOp) RmDir(*fuseops.RmDirOp) error
Unlink(*fuseops.UnlinkOp) Unlink(*fuseops.UnlinkOp) error
OpenDir(*fuseops.OpenDirOp) OpenDir(*fuseops.OpenDirOp) error
ReadDir(*fuseops.ReadDirOp) ReadDir(*fuseops.ReadDirOp) error
ReleaseDirHandle(*fuseops.ReleaseDirHandleOp) ReleaseDirHandle(*fuseops.ReleaseDirHandleOp) error
OpenFile(*fuseops.OpenFileOp) OpenFile(*fuseops.OpenFileOp) error
ReadFile(*fuseops.ReadFileOp) ReadFile(*fuseops.ReadFileOp) error
WriteFile(*fuseops.WriteFileOp) WriteFile(*fuseops.WriteFileOp) error
SyncFile(*fuseops.SyncFileOp) SyncFile(*fuseops.SyncFileOp) error
FlushFile(*fuseops.FlushFileOp) FlushFile(*fuseops.FlushFileOp) error
ReleaseFileHandle(*fuseops.ReleaseFileHandleOp) ReleaseFileHandle(*fuseops.ReleaseFileHandleOp) error
ReadSymlink(*fuseops.ReadSymlinkOp) ReadSymlink(*fuseops.ReadSymlinkOp) error
} }
// Create a fuse.Server that handles ops by calling the associated FileSystem // Create a fuse.Server that handles ops by calling the associated FileSystem