Created
April 2, 2014 15:42
-
-
Save codingjester/9936732 to your computer and use it in GitHub Desktop.
Example File globbing for the path you want
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
def job_files(path=".") | |
Dir.glob("#{path}/**/*").select { |path| File.file?(path) } | |
end | |
puts job_files("ok") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment