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