2018-05-07 Edward Smith-Rowland <3dw4rd@verizon.net>
[official-gcc.git] / libgo / go / os / types_plan9.go
blob125da661b79de9307e5830d0e5867a46f769a62b
1 // Copyright 2009 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
5 package os
7 import (
8 "syscall"
9 "time"
12 // A fileStat is the implementation of FileInfo returned by Stat and Lstat.
13 type fileStat struct {
14 name string
15 size int64
16 mode FileMode
17 modTime time.Time
18 sys interface{}
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() interface{} { return fs.sys }
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
32 const badFd = -1