Skip to content

Instantly share code, notes, and snippets.

@l1x
Created March 28, 2011 20:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save l1x/891262 to your computer and use it in GitHub Desktop.
Save l1x/891262 to your computer and use it in GitHub Desktop.
Find and list files+ directories recursively
require 'find'
class MyCloudFiles
def initialize
end
def find_files(dir)
Find.find(dir) { |f|
p f
}
end
end
begin
mcf = MyCloudFiles.new
mcf.find_files("test_files")
rescue => ex
puts "Exception: #{ex}"
ex
ensure
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment