class Puppet::Util::FileWatcher
Public Class Methods
new()
click to toggle source
# File lib/puppet/util/file_watcher.rb 9 def initialize 10 @files = {} 11 end
Public Instance Methods
changed?()
click to toggle source
# File lib/puppet/util/file_watcher.rb 13 def changed? 14 @files.values.any?(&:changed?) 15 end
clear()
click to toggle source
# File lib/puppet/util/file_watcher.rb 26 def clear 27 @files.clear 28 end
each(&blk)
click to toggle source
# File lib/puppet/util/file_watcher.rb 5 def each(&blk) 6 @files.keys.each(&blk) 7 end
watch(filename)
click to toggle source
# File lib/puppet/util/file_watcher.rb 17 def watch(filename) 18 return if watching?(filename) 19 @files[filename] = Puppet::Util::WatchedFile.new(filename) 20 end
watching?(filename)
click to toggle source
# File lib/puppet/util/file_watcher.rb 22 def watching?(filename) 23 @files.has_key?(filename) 24 end