linstrom/shared/isWritable.go
mstar 98191fd098
Some checks are pending
/ test (push) Waiting to run
Add proper logfile support
2025-04-08 17:29:28 +02:00

11 lines
263 B
Go

//go:build !windows
// +build !windows
package shared
import "golang.org/x/sys/unix"
// Copied from https://stackoverflow.com/a/20026945 and https://stackoverflow.com/a/49148866
func IsWritable(path string) bool {
return unix.Access(path, unix.W_OK) == nil
}