mirror of
https://github.com/vbatts/go-mtree.git
synced 2025-07-19 13:00:27 +00:00
*: use UtimesNanoAt from x/sys/unix
Use UtimesNanoAt from golang.org/x/sys/unix instead of manually crafting the syscall. Since UtimesNanoAt is provided for all unix-like OSes, factor out lchtimes to its own file with appropriate build tags. This allows to make use of it on darwin, dragonfly, freebsd, openbsd, netbsd and solaris in addition to linux. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
This commit is contained in:
parent
7742183cd4
commit
3fe21921b5
4 changed files with 33 additions and 42 deletions
|
@ -4,13 +4,8 @@ package mtree
|
|||
|
||||
import (
|
||||
"os"
|
||||
"time"
|
||||
)
|
||||
|
||||
func xattrUpdateKeywordFunc(path string, kv KeyVal) (os.FileInfo, error) {
|
||||
return os.Lstat(path)
|
||||
}
|
||||
|
||||
func lchtimes(name string, atime time.Time, mtime time.Time) error {
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue