Added Atime and Mtime fields.

geesefs-0-30-9
Aaron Jacobs 2015-03-06 06:03:25 +11:00
parent 76ac5cc264
commit 1698f1604a
2 changed files with 12 additions and 2 deletions

View File

@ -433,8 +433,10 @@ type SetInodeAttributesRequest struct {
Inode InodeID
// The attributes to modify, or nil for attributes that don't need a change.
Size *uint64
Mode *os.FileMode
Size *uint64
Mode *os.FileMode
Atime *time.Time
Mtime *time.Time
}
type SetInodeAttributesResponse struct {

View File

@ -186,6 +186,14 @@ func (s *server) handleFuseRequest(fuseReq bazilfuse.Request) {
req.Mode = &typed.Mode
}
if typed.Valid&bazilfuse.SetattrAtime != 0 {
req.Atime = &typed.Atime
}
if typed.Valid&bazilfuse.SetattrMtime != 0 {
req.Mtime = &typed.Mtime
}
// Call the file system.
resp, err := s.fs.SetInodeAttributes(ctx, req)
if err != nil {