# File lib/facet/dir/recurse.rb, line 7 def Dir.recurse(path, &block) stoplist = ['.', '..'] Dir.foreach(path) do |f| next if stoplist.include?(f) filename = path + '/' + f yield(filename) if FileTest.directory?(filename) and not FileTest.symlink?(filename) Dir.recurse(filename, &block) end end end