File Directory Ruby

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