status-go/vendor/github.com/anacrolix/missinggo/v2/atime_windows.go

13 lines
221 B
Go
Raw Normal View History

2022-03-10 09:44:48 +00:00
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()))
}