mark2web/vendor/github.com/otiai10/copy/stat_times_windows.go
Sebastian Frank a781485c0a
Some checks failed
continuous-integration/drone/push Build is failing
no git submodules
2022-02-28 10:28:34 +01:00

19 lines
364 B
Go

// +build windows
package copy
import (
"os"
"syscall"
"time"
)
func getTimeSpec(info os.FileInfo) timespec {
stat := info.Sys().(*syscall.Win32FileAttributeData)
return timespec{
Mtime: time.Unix(0, stat.LastWriteTime.Nanoseconds()),
Atime: time.Unix(0, stat.LastAccessTime.Nanoseconds()),
Ctime: time.Unix(0, stat.CreationTime.Nanoseconds()),
}
}