文件操作 - object_counts.rb
返回文件管理
返回主菜单
删除本文件
文件: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/profiler/object_counts.rb
编辑文件内容
# frozen_string_literal: true require_relative '../../../puppet/util/profiler/logging' class Puppet::Util::Profiler::ObjectCounts < Puppet::Util::Profiler::Logging def start ObjectSpace.count_objects end def finish(before) after = ObjectSpace.count_objects diff = before.collect do |type, count| [type, after[type] - count] end diff.sort.collect { |pair| pair.join(': ') }.join(', ') end end
修改文件时间
将文件时间修改为当前时间的前一年
删除文件