// Utimens - path based version of loopbackFile.Utimens() func (fs *loopbackFileSystem) Utimens(path string, a *time.Time, m *time.Time, context *fuse.Context) (code fuse.Status) { var ts [2]syscall.Timespec ts[0] = fuse.UtimeToTimespec(a) ts[1] = fuse.UtimeToTimespec(m) err := sysUtimensat(0, fs.GetPath(path), &ts, _AT_SYMLINK_NOFOLLOW) return fuse.ToStatus(err) }
// Utimens - file handle based version of loopbackFileSystem.Utimens() func (f *loopbackFile) Utimens(a *time.Time, m *time.Time) fuse.Status { var ts [2]syscall.Timespec ts[0] = fuse.UtimeToTimespec(a) ts[1] = fuse.UtimeToTimespec(m) f.lock.Lock() err := futimens(int(f.File.Fd()), &ts) f.lock.Unlock() return fuse.ToStatus(err) }