From 505b5cb326d4ce3f1c5adf668b0d2ca0ec5621fd Mon Sep 17 00:00:00 2001 From: Aaron Jacobs Date: Fri, 27 Feb 2015 13:37:21 +1100 Subject: [PATCH] Implemented HelloFS.GetInodeAttributes. --- samples/hello_fs.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/samples/hello_fs.go b/samples/hello_fs.go index 9ad5c92..d2fe156 100644 --- a/samples/hello_fs.go +++ b/samples/hello_fs.go @@ -64,6 +64,25 @@ var gInodeInfo = map[fuse.InodeID]inodeInfo{ }, } +func (fs *HelloFS) GetInodeAttributes( + ctx context.Context, + req *fuse.GetInodeAttributesRequest) ( + resp *fuse.GetInodeAttributesResponse, err error) { + resp = &fuse.GetInodeAttributesResponse{} + + // Find the info for this inode. + info, ok := gInodeInfo[req.Inode] + if !ok { + err = fuse.ENOENT + return + } + + // Copy over its attributes. + resp.Attributes = info.attributes + + return +} + func (fs *HelloFS) OpenDir( ctx context.Context, req *fuse.OpenDirRequest) (resp *fuse.OpenDirResponse, err error) {