# File lib/fileutils.rb, line 1017 def touch(list, options = {}) fu_check_options options, OPT_TABLE['touch'] list = fu_list(list) created = nocreate = options[:nocreate] t = options[:mtime] if options[:verbose] fu_output_message "touch #{nocreate ? ' -c' : ''}#{t ? t.strftime(' -t %Y%m%d%H%M.%S') : ''}#{list.join ' '}" end return if options[:noop] list.each do |path| created = nocreate begin File.utime(t, t, path) rescue Errno::ENOENT raise if created File.open(path, 'a') { ; } created = true retry if t end end end