18 lines
271 B
Go
18 lines
271 B
Go
|
// +build linux
|
||
|
|
||
|
package store
|
||
|
|
||
|
import (
|
||
|
"os"
|
||
|
"syscall"
|
||
|
"time"
|
||
|
)
|
||
|
|
||
|
func timespecToTime(ts syscall.Timespec) time.Time {
|
||
|
return time.Unix(int64(ts.Sec), int64(ts.Nsec))
|
||
|
}
|
||
|
|
||
|
func atime(fi os.FileInfo) time.Time {
|
||
|
return timespecToTime(fi.Sys().(*syscall.Stat_t).Atim)
|
||
|
}
|