//+build linux darwin package staros import ( "os" "syscall" "time" ) func timespecToTime(ts syscall.Timespec) time.Time { return time.Unix(int64(ts.Sec), int64(ts.Nsec)) } func GetFileCreationTime(fileinfo os.FileInfo) time.Time { return timespecToTime(stat_t.Ctim) } func GetFileAccessTime(fileinfo os.FileInfo) time.Time { return timespecToTime(stat_t.Atim) }