- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for hasWritePerm (0.5 sec)
-
src/cmd/go/internal/modload/stat_unix.go
import ( "io/fs" "os" "syscall" ) // hasWritePerm reports whether the current user has permission to write to the // file with the given info. // // Although the root user on most Unix systems can write to files even without // permission, hasWritePerm reports false if no appropriate permission bit is // set even if the current user is root. func hasWritePerm(path string, fi fs.FileInfo) bool { if os.Getuid() == 0 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 29 16:24:51 UTC 2022 - 963 bytes - Viewed (0) -
src/cmd/go/internal/modload/stat_windows.go
// license that can be found in the LICENSE file. //go:build windows package modload import "io/fs" // hasWritePerm reports whether the current user has permission to write to the // file with the given info. func hasWritePerm(_ string, fi fs.FileInfo) bool { // Windows has a read-only attribute independent of ACLs, so use that to // determine whether the file is intended to be overwritten.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 28 18:17:57 UTC 2021 - 733 bytes - Viewed (0) -
src/cmd/go/internal/modload/stat_openfile.go
// // js,wasm is similar, in that it does not define syscall.Access. package modload import ( "io/fs" "os" ) // hasWritePerm reports whether the current user has permission to write to the // file with the given info. func hasWritePerm(path string, _ fs.FileInfo) bool { if f, err := os.OpenFile(path, os.O_WRONLY, 0); err == nil { f.Close() return true } return false
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 12 16:45:11 UTC 2022 - 791 bytes - Viewed (0)