I want to get all file names from a folder using Ruby.
Dir.new('/home/user/foldername').each { |file| puts file }