2008年10月29日 星期三

Dir,entries,glob

http://www.ruby-doc.org/core/classes/Dir.html

Dir.entries("#{RAILS_ROOT}/public/images/score/1")
=> ["victory_32.png", "..", "victory_128.png", "victory_64.png", "."]

Dir.glob("#{RAILS_ROOT}/public/images/score/1")
=> ["/home/lake/rails_app/iwakela/public/images/score/1"]

沒有留言: