File.ftype(file_name) â string
Class Public methods
Identifies the type of the named file; the return string is one of
âfile
'', âdirectory
'',
âcharacterSpecial
'',
âblockSpecial
'', âfifo
'',
âlink
'', âsocket
'', or
âunknown
''.
File.ftype("testfile") #=> "file" File.ftype("/dev/tty") #=> "characterSpecial" File.ftype("/tmp/.X11-unix/X0") #=> "socket"
Please login to continue.