現在いるディレクトリの直下にあるテキストファイルを列挙するサンプル
require "find" Find.find("./") do |fn| if fn =~ /.txt$/ puts "#{fn}" end end
トップへ