Source file
src/os/types_unix.go
1
2
3
4
5
6
7 package os
8
9 import (
10 "syscall"
11 "time"
12 )
13
14
15 type fileStat struct {
16 name string
17 size int64
18 mode FileMode
19 modTime time.Time
20 sys syscall.Stat_t
21 }
22
23 func (fs *fileStat) Size() int64 { return fs.size }
24 func (fs *fileStat) Mode() FileMode { return fs.mode }
25 func (fs *fileStat) ModTime() time.Time { return fs.modTime }
26 func (fs *fileStat) Sys() any { return &fs.sys }
27
28 func sameFile(fs1, fs2 *fileStat) bool {
29 return fs1.sys.Dev == fs2.sys.Dev && fs1.sys.Ino == fs2.sys.Ino
30 }
31
View as plain text