Directory listing

You can use the Dir class to do that pretty easily. If you just want a list of all files in a directory excluding any subdirectories you can do it like this:

Dir[RAILS_ROOT+"/public/*"].reject{|f| File.directory?(f)}.map {|f| File.basename(f) }

Cheers-

-- Ezra Zygmuntowicz-- Lead Rails Architect -- ez@engineyard.com -- Engine Yard, Serious Rails Hosting -- Reliability, Ease of Use, Scalability -- (866) 518-YARD (9273)