Is it block, char or socket or pipe : File type « File Directory « Ruby






Is it block, char or socket or pipe


File.blockdev? '/dev/hda1'                   # => true
File.chardev? '/dev/tty1'                    # => true
File.socket? '/var/run/mysqld/mysqld.sock'   # => true
system('mkfifo named_pipe')
File.pipe? 'named_pipe'                      # => true

 








Related examples in the same category