Created
March 28, 2011 20:56
-
-
Save l1x/891262 to your computer and use it in GitHub Desktop.
Find and list files+ directories recursively
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
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