Mega Code Archive

 
Categories / Ruby / File Directory
 

Dir entries returns an array with all the entries within the specified directory Dir foreach provides the same feature, but

Dir.foreach("/usr/bin") do |entry|   puts entry end