lib/puppet/file_serving/fileset.rb
# Pull the recursion logic into one place.  It's moderately hairy, and this
# allows us to keep the hairiness apart from what we do with the files.
Pull the recursion logic into one place.  It's moderately hairy, and this
allows us to keep the hairiness apart from what we do with the files.
Pull the recursion logic into one place . It ' s moderately hairy and this allows us to keep the hairiness apart from what we do with the files .
def perform_recursion
    current_dirs = [FileSetEntry.new(0, @path, @ignore, @stat_method)]
    result = []
    while entry = current_dirs.shift
      if continue_recursion_at?(entry.depth + 1)
        entry.children.each do |child|
          result << child.path
          current_dirs << child
        end
      end
    end
    result
  end
def perform_recursion current_dirs = [ FileSetEntry . new ( 0 , @path , @ignore , @stat_method ) ] result = [ ] while entry = current_dirs . shift if continue_recursion_at? ( entry . depth + 1 ) entry . children . each do | child | result << child . path current_dirs << child end end end result end
Pull the recursion logic into one place.
Pull the recursion logic into one place .