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. 4 5// +build !windows 6// +build !plan9 7 8package os 9 10import ( 11 "syscall" 12 "time" 13) 14 15// A fileStat is the implementation of FileInfo returned by Stat and Lstat. 16type fileStat struct { 17 name string 18 size int64 19 mode FileMode 20 modTime time.Time 21 sys syscall.Stat_t 22} 23 24func (fs *fileStat) Size() int64 { return fs.size } 25func (fs *fileStat) Mode() FileMode { return fs.mode } 26func (fs *fileStat) ModTime() time.Time { return fs.modTime } 27func (fs *fileStat) Sys() interface{} { return &fs.sys } 28