ftype

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"
doc_ruby_on_rails
2015-04-06 10:37:31
Comments
Leave a Comment

Please login to continue.