diff --git a/fuseops/ops.go b/fuseops/ops.go index 009cfe9..70f9622 100644 --- a/fuseops/ops.go +++ b/fuseops/ops.go @@ -42,7 +42,7 @@ import ( // it, the file system will not successfully mount. If you don't model a sane // amount of free space, the Finder will refuse to copy files into the file // system. -type StatfsOp struct { +type StatFSOp struct { // The size of the file system's blocks, and how many there are in total. BlockSize uint32 Blocks uint64 diff --git a/fuseutil/file_system.go b/fuseutil/file_system.go index 3ebcdf8..3a9b539 100644 --- a/fuseutil/file_system.go +++ b/fuseutil/file_system.go @@ -35,6 +35,7 @@ import ( // See NotImplementedFileSystem for a convenient way to embed default // implementations for methods you don't care about. type FileSystem interface { + StatFS(context.Context, *fuseops.StatFSOp) error LookUpInode(context.Context, *fuseops.LookUpInodeOp) error GetInodeAttributes(context.Context, *fuseops.GetInodeAttributesOp) error SetInodeAttributes(context.Context, *fuseops.SetInodeAttributesOp) error diff --git a/fuseutil/not_implemented_file_system.go b/fuseutil/not_implemented_file_system.go index 41f3a6d..4bd923c 100644 --- a/fuseutil/not_implemented_file_system.go +++ b/fuseutil/not_implemented_file_system.go @@ -29,6 +29,13 @@ type NotImplementedFileSystem struct { var _ FileSystem = &NotImplementedFileSystem{} +func (fs *NotImplementedFileSystem) StatFS( + ctx context.Context, + op *fuseops.StatFSOp) (err error) { + err = fuse.ENOSYS + return +} + func (fs *NotImplementedFileSystem) LookUpInode( ctx context.Context, op *fuseops.LookUpInodeOp) (err error) {