bug fix:struct error while get file creation date
This commit is contained in:
+2
-2
@@ -13,9 +13,9 @@ func timespecToTime(ts syscall.Timespec) time.Time {
|
||||
}
|
||||
|
||||
func GetFileCreationTime(fileinfo os.FileInfo) time.Time {
|
||||
return timespecToTime(stat_t.Ctim)
|
||||
return timespecToTime(fileinfo.Sys().(*syscall.Stat_t).Ctim)
|
||||
}
|
||||
|
||||
func GetFileAccessTime(fileinfo os.FileInfo) time.Time {
|
||||
return timespecToTime(stat_t.Atim)
|
||||
return timespecToTime(fileinfo.Sys().(*syscall.Stat_t).Atim)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user