lchmod_unix.go 303 B

1234567891011121314
  1. // +build darwin freebsd solaris
  2. package driver
  3. import (
  4. "os"
  5. "golang.org/x/sys/unix"
  6. )
  7. // Lchmod changes the mode of a file not following symlinks.
  8. func (d *driver) Lchmod(path string, mode os.FileMode) error {
  9. return unix.Fchmodat(unix.AT_FDCWD, path, uint32(mode), unix.AT_SYMLINK_NOFOLLOW)
  10. }