diff options
Diffstat (limited to 'vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/stat_linux.go')
-rw-r--r-- | vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/stat_linux.go | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/stat_linux.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/stat_linux.go deleted file mode 100644 index 8b1eded..0000000 --- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/stat_linux.go +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | package system | ||
2 | |||
3 | import ( | ||
4 | "syscall" | ||
5 | ) | ||
6 | |||
7 | // fromStatT converts a syscall.Stat_t type to a system.Stat_t type | ||
8 | func fromStatT(s *syscall.Stat_t) (*StatT, error) { | ||
9 | return &StatT{size: s.Size, | ||
10 | mode: s.Mode, | ||
11 | uid: s.Uid, | ||
12 | gid: s.Gid, | ||
13 | rdev: s.Rdev, | ||
14 | mtim: s.Mtim}, nil | ||
15 | } | ||
16 | |||
17 | // FromStatT exists only on linux, and loads a system.StatT from a | ||
18 | // syscal.Stat_t. | ||
19 | func FromStatT(s *syscall.Stat_t) (*StatT, error) { | ||
20 | return fromStatT(s) | ||
21 | } | ||
22 | |||
23 | // Stat takes a path to a file and returns | ||
24 | // a system.StatT type pertaining to that file. | ||
25 | // | ||
26 | // Throws an error if the file does not exist | ||
27 | func Stat(path string) (*StatT, error) { | ||
28 | s := &syscall.Stat_t{} | ||
29 | if err := syscall.Stat(path, s); err != nil { | ||
30 | return nil, err | ||
31 | } | ||
32 | return fromStatT(s) | ||
33 | } | ||