Standard library / io/fs

fs.ModeNamedPipe

FileMode flag representing named pipe or FIFO. 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 ModeNamedPipe FileMode = 33554432

Working Example

Example Snippetgo
package main
import (  "fmt"  "io/fs")
func main() { m := fs.ModeNamedPipe | 0644; fmt.Println(m&fs.ModeNamedPipe != 0) }
Go Reference