Dir.entries contains all the entries found in a directory
# including files, hidden files, and other directories, one array element per entry.
# I'll apply Array's each method to the output of entries:
Dir.entries( "/usr/local/src/ruby-1.8.6" ).each { |e| puts e }
Related examples in the same category