Created
September 2, 2014 17:37
-
-
Save campanalbero/7a3001777911aea88fa3 to your computer and use it in GitHub Desktop.
FROM フォルダ以下のファイルを再帰的にパス順に出力する(文字同士の比較はバイトコード)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dir.glob(FROM + '**/*').sort{|a, b| a <=> b}.each do |f| | |
puts f | |
end | |
# 順場関係なしに全部出力したいだけなら以下の通り | |
# Dir.glob(FROM + '**/*') do |f| | |
# puts f | |
# end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment