From ef4c7d5c8a00070e85ad58d6dc45fa5e1001546d Mon Sep 17 00:00:00 2001 From: Aaron Jacobs Date: Tue, 17 Mar 2015 13:35:47 +1100 Subject: [PATCH] Implemented missing methods. --- samples/cachingfs/caching_fs.go | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/samples/cachingfs/caching_fs.go b/samples/cachingfs/caching_fs.go index 6c3cd83..00a6a15 100644 --- a/samples/cachingfs/caching_fs.go +++ b/samples/cachingfs/caching_fs.go @@ -16,6 +16,7 @@ package cachingfs import ( "fmt" + "os" "time" "github.com/jacobsa/fuse" @@ -149,13 +150,30 @@ func (fs *cachingFS) barID() fuse.InodeID { } // LOCKS_REQUIRED(fs.mu) -func (fs *cachingFS) fooAttrs() fuse.InodeAttributes +func (fs *cachingFS) fooAttrs() fuse.InodeAttributes { + return fuse.InodeAttributes{ + Size: FooSize, + Mode: 0777, + Mtime: fs.mtime, + } +} // LOCKS_REQUIRED(fs.mu) -func (fs *cachingFS) dirAttrs() fuse.InodeAttributes +func (fs *cachingFS) dirAttrs() fuse.InodeAttributes { + return fuse.InodeAttributes{ + Mode: os.ModeDir | 0777, + Mtime: fs.mtime, + } +} // LOCKS_REQUIRED(fs.mu) -func (fs *cachingFS) barAttrs() fuse.InodeAttributes +func (fs *cachingFS) barAttrs() fuse.InodeAttributes { + return fuse.InodeAttributes{ + Size: BarSize, + Mode: 0777, + Mtime: fs.mtime, + } +} //////////////////////////////////////////////////////////////////////// // Public interface