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