fs: remove os.FileInfo from fs.ExtendedFileInfo

Only the `Sys()` value from os.FileInfo is kept as field `sys` to
support Windows. The os.FileInfo removal ensures that for values like
`ModTime` that existed in both data structures there's no more confusion
which value is actually used.
This commit is contained in:
Michael Eischer
2024-11-30 16:58:04 +01:00
parent 847b2efba2
commit 9a99141a5f
17 changed files with 80 additions and 178 deletions

View File

@@ -18,8 +18,11 @@ func extendedStat(fi os.FileInfo) *ExtendedFileInfo {
}
extFI := ExtendedFileInfo{
FileInfo: fi,
Size: int64(s.FileSizeLow) | (int64(s.FileSizeHigh) << 32),
Name: fi.Name(),
Mode: fi.Mode(),
Size: int64(s.FileSizeLow) | (int64(s.FileSizeHigh) << 32),
sys: fi.Sys(),
}
atime := syscall.NsecToTimespec(s.LastAccessTime.Nanoseconds())