文件操作 - cloneable.rb
返回文件管理
返回主菜单
删除本文件
文件: /opt/alt/ruby21/lib64/ruby/2.1.0/rake/cloneable.rb
编辑文件内容
module Rake # ########################################################################## # Mixin for creating easily cloned objects. # module Cloneable # The hook that invoked by 'clone' and 'dup' methods. def initialize_copy(source) super source.instance_variables.each do |var| src_value = source.instance_variable_get(var) value = src_value.clone rescue src_value instance_variable_set(var, value) end end end end
修改文件时间
将文件时间修改为当前时间的前一年
删除文件