Ruby/File Directory/Dir.open
Материал из Wiki.crossplatform.ru
(Различия между версиями)
ViGOur (Обсуждение | вклад) м (1 версия: Импорт выборки материалов по Ruby) |
Текущая версия на 17:57, 13 сентября 2010
Open a folder with block logics
Dir.open("mydir") { |d| d.each { |x| puts x } }
Open a folder with grep as a filter
Dir.open("mydir") { |d| d.grep /file/ }