fs: replace statT with ExtendedFileInfo

This commit is contained in:
Michael Eischer
2024-08-24 23:43:45 +02:00
parent 6d3a5260d3
commit f0329bb4e6
14 changed files with 50 additions and 176 deletions

View File

@@ -19,7 +19,7 @@ func extendedStat(fi os.FileInfo) ExtendedFileInfo {
extFI := ExtendedFileInfo{
FileInfo: fi,
Size: int64(s.FileSizeLow) + int64(s.FileSizeHigh)<<32,
Size: int64(s.FileSizeLow) | (int64(s.FileSizeHigh) << 32),
}
atime := syscall.NsecToTimespec(s.LastAccessTime.Nanoseconds())
@@ -28,6 +28,7 @@ func extendedStat(fi os.FileInfo) ExtendedFileInfo {
mtime := syscall.NsecToTimespec(s.LastWriteTime.Nanoseconds())
extFI.ModTime = time.Unix(mtime.Unix())
// Windows does not have the concept of a "change time" in the sense Unix uses it, so we're using the LastWriteTime here.
extFI.ChangeTime = extFI.ModTime
return extFI