mirror of
https://github.com/mudler/luet.git
synced 2025-09-06 01:30:29 +00:00
Switch to go mod
This commit is contained in:
22
vendor/github.com/vbatts/go-mtree/lchtimes_unix.go
generated
vendored
Normal file
22
vendor/github.com/vbatts/go-mtree/lchtimes_unix.go
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
// +build darwin dragonfly freebsd openbsd linux netbsd solaris
|
||||
|
||||
package mtree
|
||||
|
||||
import (
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
func lchtimes(name string, atime time.Time, mtime time.Time) error {
|
||||
utimes := []unix.Timespec{
|
||||
unix.NsecToTimespec(atime.UnixNano()),
|
||||
unix.NsecToTimespec(mtime.UnixNano()),
|
||||
}
|
||||
if e := unix.UtimesNanoAt(unix.AT_FDCWD, name, utimes, unix.AT_SYMLINK_NOFOLLOW); e != nil {
|
||||
return &os.PathError{Op: "chtimes", Path: name, Err: e}
|
||||
}
|
||||
return nil
|
||||
|
||||
}
|
Reference in New Issue
Block a user