Created
February 5, 2013 21:13
-
-
Save webcoyote/4717711 to your computer and use it in GitHub Desktop.
Ruby directory globbing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dir.glob( | |
'**/*', File::FNM_DOTMATCH | |
).reject { |a| a =~ /\.{1,2}$/ }.each do |f| | |
puts f | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment