Reputation: 2069
I want to get a list of all files in a directory that contain multiple sub-directories (and possible more sub-directories within them)
How can I do this using Ruby on my Mac OS X?
Thanks
Upvotes: 3
Views: 789
Reputation: 23164
Something like this should work
Dir["**/*"].select{|x| !File.directory?(x)}
Upvotes: 4