Added FileSystem.StatFS.

geesefs-0-30-9
Aaron Jacobs 2015-09-09 09:47:48 +10:00
parent c49a7e13b7
commit 4d5341f6ce
3 changed files with 9 additions and 1 deletions

View File

@ -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

View File

@ -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

View File

@ -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) {