Files
docker-cli/components/cli/vendor/github.com/tonistiigi/fsutil/diskwriter_linux.go
T
Sebastiaan van Stijn c9e8020d97 bump moby/moby and dependencies to 14ce1f1cf48e9859223c6311de58aec4dc0f046c
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 98dbfeee76
Component: cli
2017-09-29 17:44:49 +02:00

21 lines
406 B
Go

// +build linux
package fsutil
import (
"github.com/pkg/errors"
"golang.org/x/sys/unix"
)
func chtimes(path string, un int64) error {
var utimes [2]unix.Timespec
utimes[0] = unix.NsecToTimespec(un)
utimes[1] = utimes[0]
if err := unix.UtimesNanoAt(unix.AT_FDCWD, path, utimes[0:], unix.AT_SYMLINK_NOFOLLOW); err != nil {
return errors.Wrap(err, "failed call to UtimesNanoAt")
}
return nil
}