Created
August 26, 2012 22:35
-
-
Save andyhawthorne/3483963 to your computer and use it in GitHub Desktop.
method for listing files
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 get_files(path) | |
dir_list_array = Array.new | |
Find.find(path) do |f| | |
dir_list_array << File.basename(f, ".*") if !File.directory?(f) | |
end | |
return dir_list_array | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment