Standard library / io/fs
fs.ModeIrregular
FileMode flag representing irregular file with unknown type. 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 ModeIrregular FileMode = 524288Working Example
Example Snippetgo
package main
import ( "fmt" "io/fs")
func main() { m := fs.ModeIrregular | 0644; fmt.Println(m&fs.ModeIrregular != 0) }