...
This commit is contained in:
parent
a582de98dc
commit
8e4050b923
3 changed files with 4 additions and 2 deletions
|
|
@ -34,8 +34,6 @@ func (s *StatResult) setup_common(f fs.FileInfo) (u *syscall.Stat_t) {
|
|||
u = nil
|
||||
}
|
||||
if u != nil {
|
||||
s.Has_atime = true
|
||||
s.Has_ctime = true
|
||||
s.Dev = uint64(u.Dev)
|
||||
s.Ino = uint64(u.Ino)
|
||||
s.Has_dev = true
|
||||
|
|
|
|||
|
|
@ -13,6 +13,8 @@ var _ = fmt.Print
|
|||
func Get(f fs.FileInfo) (ans StatResult) {
|
||||
u := ans.setup_common(f)
|
||||
if u != nil {
|
||||
ans.Has_atime = true
|
||||
ans.Has_ctime = true
|
||||
ans.Ctime = time.Unix(u.Ctim.Unix())
|
||||
ans.Atime = time.Unix(u.Atim.Unix())
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,6 +13,8 @@ var _ = fmt.Print
|
|||
func Get(f fs.FileInfo) (ans StatResult) {
|
||||
u := ans.setup_common(f)
|
||||
if u != nil {
|
||||
ans.Has_atime = true
|
||||
ans.Has_ctime = true
|
||||
ans.Ctime = time.Unix(u.Ctimespec.Unix())
|
||||
ans.Atime = time.Unix(u.Atimespec.Unix())
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue