Class: Nearline::Models::FileFinder

Inherits:
Object
  • Object
show all
Defined in:
lib/nearline/manifest.rb

Overview

Recuses paths and finds the files to back up

Class Method Summary collapse

Class Method Details

.recurse(paths, exclusions) ⇒ Object



7
8
9
10
11
12
13
14
15
16
# File 'lib/nearline/manifest.rb', line 7

def self.recurse(paths, exclusions)
  paths.each do |path|
    Find.find(path) do |f|
      exclusions.each do |exclusion|
        Find.prune if f =~ /#{exclusion}/
      end
      yield f
    end
  end
end