Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
12 lines (11 sloc) 224 Bytes
require 'find'
require 'fileutils'
def find_and_delete(path, pattern)
Find.find(path) do |f|
if !File.file?(f) and f[pattern]
FileUtils.rm_rf(f)
end
end
end
# print all the ruby files
find_and_delete(".", /\.svn$/)
Something went wrong with that request. Please try again.