2014-11-13 15:36:05 -05:00
|
|
|
// +build windows
|
|
|
|
|
|
|
|
package system
|
|
|
|
|
|
|
|
import (
|
2015-05-07 18:14:11 -04:00
|
|
|
"os"
|
|
|
|
"time"
|
2014-11-13 15:36:05 -05:00
|
|
|
)
|
|
|
|
|
2015-07-28 12:13:12 -04:00
|
|
|
// StatT type contains status of a file. It contains metadata
|
|
|
|
// like name, permission, size, etc about a file.
|
|
|
|
type StatT struct {
|
2015-05-07 18:14:11 -04:00
|
|
|
name string
|
|
|
|
size int64
|
|
|
|
mode os.FileMode
|
|
|
|
modTime time.Time
|
|
|
|
isDir bool
|
2014-11-13 15:36:05 -05:00
|
|
|
}
|
2015-03-11 11:42:49 -04:00
|
|
|
|
2015-07-28 12:13:12 -04:00
|
|
|
// Name returns file's name.
|
|
|
|
func (s StatT) Name() string {
|
2015-05-07 18:14:11 -04:00
|
|
|
return s.name
|
|
|
|
}
|
|
|
|
|
2015-07-28 12:13:12 -04:00
|
|
|
// Size returns file's size.
|
|
|
|
func (s StatT) Size() int64 {
|
2015-05-07 18:14:11 -04:00
|
|
|
return s.size
|
|
|
|
}
|
|
|
|
|
2015-07-28 12:13:12 -04:00
|
|
|
// Mode returns file's permission mode.
|
|
|
|
func (s StatT) Mode() os.FileMode {
|
2015-05-07 18:14:11 -04:00
|
|
|
return s.mode
|
|
|
|
}
|
|
|
|
|
2015-07-28 12:13:12 -04:00
|
|
|
// ModTime returns file's last modification time.
|
|
|
|
func (s StatT) ModTime() time.Time {
|
2015-05-07 18:14:11 -04:00
|
|
|
return s.modTime
|
|
|
|
}
|
|
|
|
|
2015-07-28 12:13:12 -04:00
|
|
|
// IsDir returns whether file is actually a directory.
|
|
|
|
func (s StatT) IsDir() bool {
|
2015-05-07 18:14:11 -04:00
|
|
|
return s.isDir
|
2015-03-11 11:42:49 -04:00
|
|
|
}
|