get a list of the files and directories within a specific directory using Dir.entries: : Dir.entries « File Directory « Ruby






get a list of the files and directories within a specific directory using Dir.entries:

puts Dir.entries("/usr/bin").join(' ')

 

Related examples in the same category

1.Dir.entries contains all the entries found in a directory
2.Listing A Directory