# File lib/puppet/type/tidy.rb, line 296 296: def tidy?(path) 297: return false unless stat = self.stat(path) 298: 299: return false if stat.ftype == "directory" and ! rmdirs? 300: 301: # The 'matches' parameter isn't OR'ed with the other tests -- 302: # it's just used to reduce the list of files we can match. 303: return false if param = parameter(:matches) and ! param.tidy?(path, stat) 304: 305: tested = false 306: [:age, :size].each do |name| 307: next unless param = parameter(name) 308: tested = true 309: return true if param.tidy?(path, stat) 310: end 311: 312: # If they don't specify either, then the file should always be removed. 313: return true unless tested 314: return false 315: end