文件操作 - total_bytes.rb
返回文件管理
返回主菜单
删除本文件
文件: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter/facts/freebsd/memory/swap/total_bytes.rb
编辑文件内容
# frozen_string_literal: true module Facts module Freebsd module Memory module Swap class TotalBytes FACT_NAME = 'memory.swap.total_bytes' ALIASES = 'swapsize_mb' def call_the_resolver fact_value = Facter::Resolvers::Freebsd::SwapMemory.resolve(:total_bytes) [Facter::ResolvedFact.new(FACT_NAME, fact_value), Facter::ResolvedFact.new(ALIASES, Facter::Util::Facts::UnitConverter.bytes_to_mb(fact_value), :legacy)] end end end end end end
修改文件时间
将文件时间修改为当前时间的前一年
删除文件