文件操作 - array.rbs
返回文件管理
返回主菜单
删除本文件
文件: /opt/puppetlabs/puppet/lib/ruby/gems/3.2.0/gems/rbs-2.8.2/stdlib/abbrev/0/array.rbs
编辑文件内容
%a{annotate:rdoc:skip} class Array[unchecked out Elem] # <!-- # rdoc-file=lib/abbrev.rb # - abbrev(pattern = nil) # --> # Calculates the set of unambiguous abbreviations for the strings in `self`. # # require 'abbrev' # %w{ car cone }.abbrev # #=> {"car"=>"car", "ca"=>"car", "cone"=>"cone", "con"=>"cone", "co"=>"cone"} # # The optional `pattern` parameter is a pattern or a string. Only input strings # that match the pattern or start with the string are included in the output # hash. # # %w{ fast boat day }.abbrev(/^.a/) # #=> {"fast"=>"fast", "fas"=>"fast", "fa"=>"fast", "day"=>"day", "da"=>"day"} # # Abbrev.abbrev(%w{car box cone}, "ca") # #=> {"car"=>"car", "ca"=>"car"} # # See also Abbrev.abbrev # def abbrev: (?String | Regexp | nil) -> Hash[String, String] end
修改文件时间
将文件时间修改为当前时间的前一年
删除文件