文件操作 - timer.rb
返回文件管理
返回主菜单
删除本文件
文件: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/watcher/timer.rb
编辑文件内容
# frozen_string_literal: true class Puppet::Util::Watcher::Timer attr_reader :timeout def initialize(timeout) @timeout = timeout end def start @start_time = now end def expired? (now - @start_time) >= @timeout end def now Time.now.to_i end end
修改文件时间
将文件时间修改为当前时间的前一年
删除文件