github.com/dougm/docker@v1.5.0/pkg/system/utimes_freebsd.go (about)

     1  package system
     2  
     3  import (
     4  	"syscall"
     5  	"unsafe"
     6  )
     7  
     8  func LUtimesNano(path string, ts []syscall.Timespec) error {
     9  	var _path *byte
    10  	_path, err := syscall.BytePtrFromString(path)
    11  	if err != nil {
    12  		return err
    13  	}
    14  
    15  	if _, _, err := syscall.Syscall(syscall.SYS_LUTIMES, uintptr(unsafe.Pointer(_path)), uintptr(unsafe.Pointer(&ts[0])), 0); err != 0 && err != syscall.ENOSYS {
    16  		return err
    17  	}
    18  
    19  	return nil
    20  }
    21  
    22  func UtimesNano(path string, ts []syscall.Timespec) error {
    23  	return syscall.UtimesNano(path, ts)
    24  }