Mega Code Archive

 
Categories / Ruby / File Directory
 

Prune under file basename

require 'find' Find.find('./') do |path|   if File.basename(path) =~ /file2$/     puts "PRUNED #{path}"     Find.prune   end   puts path end