chardev? Returns true if the file is a character device : chardev « File Directory « Ruby






chardev? Returns true if the file is a character device


File.stat("/dev/tty").chardev?  
File.stat("testfile").chardev?  

 

Related examples in the same category