mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
7e420ad850
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
43 lines
741 B
Go
43 lines
741 B
Go
// +build windows
|
|
|
|
package system
|
|
|
|
import (
|
|
"os"
|
|
"time"
|
|
)
|
|
|
|
// StatT type contains status of a file. It contains metadata
|
|
// like name, permission, size, etc about a file.
|
|
type StatT struct {
|
|
name string
|
|
size int64
|
|
mode os.FileMode
|
|
modTime time.Time
|
|
isDir bool
|
|
}
|
|
|
|
// Name returns file's name.
|
|
func (s StatT) Name() string {
|
|
return s.name
|
|
}
|
|
|
|
// Size returns file's size.
|
|
func (s StatT) Size() int64 {
|
|
return s.size
|
|
}
|
|
|
|
// Mode returns file's permission mode.
|
|
func (s StatT) Mode() os.FileMode {
|
|
return s.mode
|
|
}
|
|
|
|
// ModTime returns file's last modification time.
|
|
func (s StatT) ModTime() time.Time {
|
|
return s.modTime
|
|
}
|
|
|
|
// IsDir returns whether file is actually a directory.
|
|
func (s StatT) IsDir() bool {
|
|
return s.isDir
|
|
}
|