Module: Puppet::Util::Watcher::Common Private

Defined in:
lib/puppet/util/watcher.rb

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Class Method Summary collapse

Class Method Details

.file_ctime_change_watcher(filename) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.


7
8
9
10
11
12
13
14
15
# File 'lib/puppet/util/watcher.rb', line 7

def self.file_ctime_change_watcher(filename)
  Puppet::Util::Watcher::ChangeWatcher.watch(lambda do
    begin
      Puppet::FileSystem.stat(filename).ctime
    rescue Errno::ENOENT, Errno::ENOTDIR
      :absent
    end
  end)
end