atime_atim.go 241 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14
// +build linux dragonfly openbsd solaris

package missinggo

import (
	"os"
	"syscall"
	"time"
)

func fileInfoAccessTime(fi os.FileInfo) time.Time {
	ts := fi.Sys().(*syscall.Stat_t).Atim
	return time.Unix(int64(ts.Sec), int64(ts.Nsec))
}