Ruby/File Directory/Dir.open
Материал из Wiki.crossplatform.ru
Версия от 17:57, 13 сентября 2010; ViGOur (Обсуждение | вклад)
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/ }