mirror of
https://github.com/restic/restic.git
synced 2025-12-11 18:47:50 +00:00
fs: inline ExtendedStat
This commit is contained in:
@@ -10,10 +10,10 @@ import (
|
||||
)
|
||||
|
||||
// extendedStat extracts info into an ExtendedFileInfo for unix based operating systems.
|
||||
func extendedStat(fi os.FileInfo) ExtendedFileInfo {
|
||||
func extendedStat(fi os.FileInfo) *ExtendedFileInfo {
|
||||
s := fi.Sys().(*syscall.Stat_t)
|
||||
|
||||
extFI := ExtendedFileInfo{
|
||||
return &ExtendedFileInfo{
|
||||
FileInfo: fi,
|
||||
DeviceID: uint64(s.Dev),
|
||||
Inode: s.Ino,
|
||||
@@ -29,6 +29,4 @@ func extendedStat(fi os.FileInfo) ExtendedFileInfo {
|
||||
ModTime: time.Unix(s.Mtim.Unix()),
|
||||
ChangeTime: time.Unix(s.Ctim.Unix()),
|
||||
}
|
||||
|
||||
return extFI
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user