From 420fcddfacaf900ac643b05889e85a5517abc0f3 Mon Sep 17 00:00:00 2001 From: Aaron Jacobs Date: Tue, 3 Mar 2015 10:48:26 +1100 Subject: [PATCH] Fixed time-related metadata. --- file_system.go | 9 +++++---- samples/memfs/fs.go | 1 + server.go | 1 + 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/file_system.go b/file_system.go index 083902c..6ba0eef 100644 --- a/file_system.go +++ b/file_system.go @@ -159,10 +159,11 @@ type InodeAttributes struct { Size uint64 Mode os.FileMode - // Time information - Atime time.Time - Mtime time.Time - Crtime time.Time + // Time information. See `man 2 stat` for full details. + Atime time.Time // Time of last access + Mtime time.Time // Time of last modification + Ctime time.Time // Time of last modification to inode + Crtime time.Time // Time of creation (OS X only) // Owner information Uid uint32 diff --git a/samples/memfs/fs.go b/samples/memfs/fs.go index ec927b8..30a33e7 100644 --- a/samples/memfs/fs.go +++ b/samples/memfs/fs.go @@ -247,6 +247,7 @@ func (fs *memFS) MkDir( Mode: req.Mode, Atime: now, Mtime: now, + Ctime: now, Crtime: now, } diff --git a/server.go b/server.go index 242c3e2..58ee522 100644 --- a/server.go +++ b/server.go @@ -288,6 +288,7 @@ func convertAttributes(inode InodeID, attr InodeAttributes) bazilfuse.Attr { Mode: attr.Mode, Atime: attr.Atime, Mtime: attr.Mtime, + Ctime: attr.Ctime, Crtime: attr.Crtime, Uid: attr.Uid, Gid: attr.Gid,