aboutsummaryrefslogtreecommitdiffhomepage
path: root/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/chtimes_windows.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/chtimes_windows.go')
-rw-r--r--vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/chtimes_windows.go27
1 files changed, 0 insertions, 27 deletions
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/chtimes_windows.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/chtimes_windows.go
deleted file mode 100644
index 2945868..0000000
--- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/system/chtimes_windows.go
+++ /dev/null
@@ -1,27 +0,0 @@
1// +build windows
2
3package system
4
5import (
6 "syscall"
7 "time"
8)
9
10//setCTime will set the create time on a file. On Windows, this requires
11//calling SetFileTime and explicitly including the create time.
12func setCTime(path string, ctime time.Time) error {
13 ctimespec := syscall.NsecToTimespec(ctime.UnixNano())
14 pathp, e := syscall.UTF16PtrFromString(path)
15 if e != nil {
16 return e
17 }
18 h, e := syscall.CreateFile(pathp,
19 syscall.FILE_WRITE_ATTRIBUTES, syscall.FILE_SHARE_WRITE, nil,
20 syscall.OPEN_EXISTING, syscall.FILE_FLAG_BACKUP_SEMANTICS, 0)
21 if e != nil {
22 return e
23 }
24 defer syscall.Close(h)
25 c := syscall.NsecToFiletime(syscall.TimespecToNsec(ctimespec))
26 return syscall.SetFileTime(h, &c, nil, nil)
27}