Skip to content

Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →

class method

File.mkfifo

(::path file_name, ?::int mode) -> 0
File.mkfifo(path, mode = 0666) → 0

Creates a FIFO special file at the given path, with the permissions given by mode; see Filesystem Modes:

Example
path = '/tmp/pipe'
File.mkfifo(path)
File.pipe?(path) # => true
File.ftype(path) # => "fifo"
File.unlink(path)

Not implemented on Windows.

See also .lutime .mtime .lstat .new also in 4.0 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0