public
Created

method for listing files

  • Download Gist
get_files.rb
Ruby
1 2 3 4 5 6 7
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

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.