mirror of
https://github.com/genuinetools/reg.git
synced 2024-07-04 12:34:17 -04:00
843aebf2c1
Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
15 lines
303 B
Go
15 lines
303 B
Go
// +build darwin freebsd solaris
|
|
|
|
package driver
|
|
|
|
import (
|
|
"os"
|
|
|
|
"golang.org/x/sys/unix"
|
|
)
|
|
|
|
// Lchmod changes the mode of a file not following symlinks.
|
|
func (d *driver) Lchmod(path string, mode os.FileMode) error {
|
|
return unix.Fchmodat(unix.AT_FDCWD, path, uint32(mode), unix.AT_SYMLINK_NOFOLLOW)
|
|
}
|