class Puppet::Util::FileWatcher

Public Class Methods

new() click to toggle source
   # File lib/puppet/util/file_watcher.rb
 8 def initialize
 9   @files = {}
10 end

Public Instance Methods

changed?() click to toggle source
   # File lib/puppet/util/file_watcher.rb
12 def changed?
13   @files.values.any?(&:changed?)
14 end
clear() click to toggle source
   # File lib/puppet/util/file_watcher.rb
25 def clear
26   @files.clear
27 end
each(&blk) click to toggle source
  # File lib/puppet/util/file_watcher.rb
4 def each(&blk)
5   @files.keys.each(&blk)
6 end
watch(filename) click to toggle source
   # File lib/puppet/util/file_watcher.rb
16 def watch(filename)
17   return if watching?(filename)
18   @files[filename] = Puppet::Util::WatchedFile.new(filename)
19 end
watching?(filename) click to toggle source
   # File lib/puppet/util/file_watcher.rb
21 def watching?(filename)
22   @files.has_key?(filename)
23 end