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