mirror of
https://github.com/restic/restic.git
synced 2025-12-11 18:47:50 +00:00
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:
@@ -8,7 +8,8 @@ import (
|
||||
// ExtendedFileInfo is an extended stat_t, filled with attributes that are
|
||||
// supported by most operating systems. The original FileInfo is embedded.
|
||||
type ExtendedFileInfo struct {
|
||||
os.FileInfo
|
||||
Name string
|
||||
Mode os.FileMode
|
||||
|
||||
DeviceID uint64 // ID of device containing the file
|
||||
Inode uint64 // Inode number
|
||||
@@ -23,6 +24,9 @@ type ExtendedFileInfo struct {
|
||||
AccessTime time.Time // last access time stamp
|
||||
ModTime time.Time // last (content) modification time stamp
|
||||
ChangeTime time.Time // last status change time stamp
|
||||
|
||||
// nolint:unused // only used on Windows
|
||||
sys any // Value returned by os.FileInfo.Sys()
|
||||
}
|
||||
|
||||
// ExtendedStat returns an ExtendedFileInfo constructed from the os.FileInfo.
|
||||
|
||||
Reference in New Issue
Block a user