libgo: update to go1.9
[official-gcc.git] / libgo / go / os / types_unix.go
blobc0259ae0e8411f791fadfd3a57ed3f6d9c44620b
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 // +build !windows
6 // +build !plan9
8 package os
10 import (
11 "syscall"
12 "time"
15 // A fileStat is the implementation of FileInfo returned by Stat and Lstat.
16 type fileStat struct {
17 name string
18 size int64
19 mode FileMode
20 modTime time.Time
21 sys syscall.Stat_t
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 }
29 func sameFile(fs1, fs2 *fileStat) bool {
30 return fs1.sys.Dev == fs2.sys.Dev && fs1.sys.Ino == fs2.sys.Ino