writable_unix.go 192 B

123456789101112
  1. //go:build !windows && !plan9 && !js && !noselfupdate
  2. package selfupdate
  3. import (
  4. "golang.org/x/sys/unix"
  5. )
  6. func writable(path string) bool {
  7. return unix.Access(path, unix.W_OK) == nil
  8. }