Standard library / io/fs
fs.ModeExclusive
FileMode flag representing exclusive use. Test with a bitwise AND; setting a bit in a Go value does not change actual filesystem metadata. Expected stdout: 'true\n'.
Formal Syntax & Structure
go syntaxgo
const ModeExclusive FileMode = 536870912Working Example
Example Snippetgo
package main
import ( "fmt" "io/fs")
func main() { m := fs.ModeExclusive | 0644; fmt.Println(m&fs.ModeExclusive != 0) }