mirror of
https://github.com/rclone/rclone.git
synced 2024-12-04 22:34:48 +01:00
21 lines
546 B
Go
21 lines
546 B
Go
// Copyright 2016 the Go-FUSE Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package fs
|
|
|
|
import (
|
|
"syscall"
|
|
"unsafe"
|
|
)
|
|
|
|
// futimens - futimens(3) calls utimensat(2) with "pathname" set to null and
|
|
// "flags" set to zero
|
|
func futimens(fd int, times *[2]syscall.Timespec) (err error) {
|
|
_, _, e1 := syscall.Syscall6(syscall.SYS_UTIMENSAT, uintptr(fd), 0, uintptr(unsafe.Pointer(times)), uintptr(0), 0, 0)
|
|
if e1 != 0 {
|
|
err = syscall.Errno(e1)
|
|
}
|
|
return
|
|
}
|