Ruby 2.7.0 リファレンスマニュアル > ライブラリ一覧 > 組み込みライブラリ > File::Statクラス > pipe?

instance method File::Stat#pipe?

pipe? -> bool[permalink][rdoc]

無名パイプおよび名前つきパイプ(FIFO)の時に真を返します。


system("mkfifo /tmp/pipetest")
p File::Stat.new("/tmp/pipetest").pipe? #=> true