atime_windows.go 221 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12
package missinggo

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

func fileInfoAccessTime(fi os.FileInfo) time.Time {
	ts := fi.Sys().(*syscall.Win32FileAttributeData).LastAccessTime
	return time.Unix(0, int64(ts.Nanoseconds()))
}