github.com/codemac/docker@v1.2.1-0.20150518222241-6a18412d5b9c/pkg/system/stat.go (about) 1 package system 2 3 import ( 4 "syscall" 5 ) 6 7 // Stat_t type contains status of a file. It contains metadata 8 // like permission, owner, group, size, etc about a file 9 type Stat_t struct { 10 mode uint32 11 uid uint32 12 gid uint32 13 rdev uint64 14 size int64 15 mtim syscall.Timespec 16 } 17 18 func (s Stat_t) Mode() uint32 { 19 return s.mode 20 } 21 22 func (s Stat_t) Uid() uint32 { 23 return s.uid 24 } 25 26 func (s Stat_t) Gid() uint32 { 27 return s.gid 28 } 29 30 func (s Stat_t) Rdev() uint64 { 31 return s.rdev 32 } 33 34 func (s Stat_t) Size() int64 { 35 return s.size 36 } 37 38 func (s Stat_t) Mtim() syscall.Timespec { 39 return s.mtim 40 } 41 42 func (s Stat_t) GetLastModification() syscall.Timespec { 43 return s.Mtim() 44 }