2023-03-09 18:41:41 +01:00
|
|
|
//go:build linux
|
2020-04-03 14:47:45 +02:00
|
|
|
// +build linux
|
|
|
|
|
|
|
|
package store
|
|
|
|
|
|
|
|
import (
|
|
|
|
"os"
|
|
|
|
"syscall"
|
|
|
|
"time"
|
|
|
|
)
|
|
|
|
|
|
|
|
func timespecToTime(ts syscall.Timespec) time.Time {
|
2023-03-09 18:41:41 +01:00
|
|
|
return time.Unix(ts.Sec, ts.Nsec)
|
2020-04-03 14:47:45 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
func atime(fi os.FileInfo) time.Time {
|
|
|
|
return timespecToTime(fi.Sys().(*syscall.Stat_t).Atim)
|
|
|
|
}
|