diff --git a/samples/statfs/statfs.go b/samples/statfs/statfs.go index d80ac24..e8656ec 100644 --- a/samples/statfs/statfs.go +++ b/samples/statfs/statfs.go @@ -114,6 +114,21 @@ func (fs *statFS) StatFS( return } +func (fs *statFS) LookUpInode( + ctx context.Context, + op *fuseops.LookUpInodeOp) (err error) { + // Only the root has children. + if op.Parent != fuseops.RootInodeID { + err = fuse.ENOENT + return + } + + op.Entry.Child = childInodeID + op.Entry.Attributes = fileAttrs() + + return +} + func (fs *statFS) GetInodeAttributes( ctx context.Context, op *fuseops.GetInodeAttributesOp) (err error) { @@ -131,6 +146,13 @@ func (fs *statFS) GetInodeAttributes( return } +func (fs *statFS) SetInodeAttributes( + ctx context.Context, + op *fuseops.SetInodeAttributesOp) (err error) { + // Ignore calls to truncate existing files when opening. + return +} + func (fs *statFS) OpenFile( ctx context.Context, op *fuseops.OpenFileOp) (err error) {