文件操作 - terminus_selector.rb
返回文件管理
返回主菜单
删除本文件
文件: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/file_serving/terminus_selector.rb
编辑文件内容
# frozen_string_literal: true require_relative '../../puppet/file_serving' # This module is used to pick the appropriate terminus # in file-serving indirections. This is necessary because # the terminus varies based on the URI asked for. module Puppet::FileServing::TerminusSelector def select(request) # We rely on the request's parsing of the URI. case request.protocol when "file" :file when "puppet" if request.server :rest else Puppet[:default_file_terminus] end when "http", "https" :http when nil if Puppet::Util.absolute_path?(request.key) :file else :file_server end else raise ArgumentError, _("URI protocol '%{protocol}' is not currently supported for file serving") % { protocol: request.protocol } end end end
修改文件时间
将文件时间修改为当前时间的前一年
删除文件