Added time info.
parent
5514405606
commit
1750a271f5
|
@ -92,6 +92,9 @@ const RootInodeID InodeID = InodeID(bazilfuse.RootID)
|
|||
type InodeAttributes struct {
|
||||
Size uint64
|
||||
Mode os.FileMode
|
||||
Atime time.Time
|
||||
Mtime time.Time
|
||||
Crtime time.Time
|
||||
}
|
||||
|
||||
// A generation number for an inode. Irrelevant for file systems that won't be
|
||||
|
|
|
@ -139,6 +139,12 @@ func (fs *HelloFS) LookUpInode(
|
|||
resp.Child = childInode
|
||||
resp.Attributes = gInodeInfo[childInode].attributes
|
||||
|
||||
// Patch attributes.
|
||||
now := fs.Clock.Now()
|
||||
resp.Attributes.Atime = now
|
||||
resp.Attributes.Mtime = now
|
||||
resp.Attributes.Crtime = now
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -158,6 +164,12 @@ func (fs *HelloFS) GetInodeAttributes(
|
|||
// Copy over its attributes.
|
||||
resp.Attributes = info.attributes
|
||||
|
||||
// Patch attributes.
|
||||
now := fs.Clock.Now()
|
||||
resp.Attributes.Atime = now
|
||||
resp.Attributes.Mtime = now
|
||||
resp.Attributes.Crtime = now
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue