// +build windows package staros import ( "os" "syscall" "time" ) func GetFileCreationTime(fileinfo os.FileInfo) time.Time { d := fileinfo.Sys().(*syscall.Win32FileAttributeData) return time.Unix(0, d.CreationTime.Nanoseconds()) } func GetFileAccessTime(fileinfo os.FileInfo) time.Time { d := fileinfo.Sys().(*syscall.Win32FileAttributeData) return time.Unix(0, d.LastAccessTime.Nanoseconds()) }