]> git.immae.eu Git - github/fretlink/terraform-provider-statuscake.git/blob - vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/stat.go
087034c5ec55e1723c737dcd5197c9949252d8f3
[github/fretlink/terraform-provider-statuscake.git] / vendor / github.com / fsouza / go-dockerclient / external / github.com / docker / docker / pkg / system / stat.go
1 // +build !windows
2
3 package system
4
5 import (
6 "syscall"
7 )
8
9 // StatT type contains status of a file. It contains metadata
10 // like permission, owner, group, size, etc about a file.
11 type StatT struct {
12 mode uint32
13 uid uint32
14 gid uint32
15 rdev uint64
16 size int64
17 mtim syscall.Timespec
18 }
19
20 // Mode returns file's permission mode.
21 func (s StatT) Mode() uint32 {
22 return s.mode
23 }
24
25 // UID returns file's user id of owner.
26 func (s StatT) UID() uint32 {
27 return s.uid
28 }
29
30 // GID returns file's group id of owner.
31 func (s StatT) GID() uint32 {
32 return s.gid
33 }
34
35 // Rdev returns file's device ID (if it's special file).
36 func (s StatT) Rdev() uint64 {
37 return s.rdev
38 }
39
40 // Size returns file's size.
41 func (s StatT) Size() int64 {
42 return s.size
43 }
44
45 // Mtim returns file's last modification time.
46 func (s StatT) Mtim() syscall.Timespec {
47 return s.mtim
48 }
49
50 // GetLastModification returns file's last modification time.
51 func (s StatT) GetLastModification() syscall.Timespec {
52 return s.Mtim()
53 }