Ruby/File Directory/ftype

Материал из Wiki.crossplatform.ru

Версия от 17:57, 13 сентября 2010; ViGOur (Обсуждение | вклад)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к: навигация, поиск

Get file type

File::ftype( "access.rb" ) # => "file"



inquire about the type of a file with ftype

# The ftype method identifies the type of the file by returning one of the following: 
# file, directory, characterSpecial, blockSpecial, fifo, link, socket, or unknown.
 
File::ftype( "file.rb" ) # => "file"