Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/AnonR/anonr.TX.../opt/alt/ruby27/share/ruby/uri
File: file.rb
# frozen_string_literal: true
[0] Fix | Delete
[1] Fix | Delete
require_relative 'generic'
[2] Fix | Delete
[3] Fix | Delete
module URI
[4] Fix | Delete
[5] Fix | Delete
#
[6] Fix | Delete
# The "file" URI is defined by RFC8089.
[7] Fix | Delete
#
[8] Fix | Delete
class File < Generic
[9] Fix | Delete
# A Default port of nil for URI::File.
[10] Fix | Delete
DEFAULT_PORT = nil
[11] Fix | Delete
[12] Fix | Delete
#
[13] Fix | Delete
# An Array of the available components for URI::File.
[14] Fix | Delete
#
[15] Fix | Delete
COMPONENT = [
[16] Fix | Delete
:scheme,
[17] Fix | Delete
:host,
[18] Fix | Delete
:path
[19] Fix | Delete
].freeze
[20] Fix | Delete
[21] Fix | Delete
#
[22] Fix | Delete
# == Description
[23] Fix | Delete
#
[24] Fix | Delete
# Creates a new URI::File object from components, with syntax checking.
[25] Fix | Delete
#
[26] Fix | Delete
# The components accepted are +host+ and +path+.
[27] Fix | Delete
#
[28] Fix | Delete
# The components should be provided either as an Array, or as a Hash
[29] Fix | Delete
# with keys formed by preceding the component names with a colon.
[30] Fix | Delete
#
[31] Fix | Delete
# If an Array is used, the components must be passed in the
[32] Fix | Delete
# order <code>[host, path]</code>.
[33] Fix | Delete
#
[34] Fix | Delete
# Examples:
[35] Fix | Delete
#
[36] Fix | Delete
# require 'uri'
[37] Fix | Delete
#
[38] Fix | Delete
# uri1 = URI::File.build(['host.example.com', '/path/file.zip'])
[39] Fix | Delete
# uri1.to_s # => "file://host.example.com/path/file.zip"
[40] Fix | Delete
#
[41] Fix | Delete
# uri2 = URI::File.build({:host => 'host.example.com',
[42] Fix | Delete
# :path => '/ruby/src'})
[43] Fix | Delete
# uri2.to_s # => "file://host.example.com/ruby/src"
[44] Fix | Delete
#
[45] Fix | Delete
def self.build(args)
[46] Fix | Delete
tmp = Util::make_components_hash(self, args)
[47] Fix | Delete
super(tmp)
[48] Fix | Delete
end
[49] Fix | Delete
[50] Fix | Delete
# Protected setter for the host component +v+.
[51] Fix | Delete
#
[52] Fix | Delete
# See also URI::Generic.host=.
[53] Fix | Delete
#
[54] Fix | Delete
def set_host(v)
[55] Fix | Delete
v = "" if v.nil? || v == "localhost"
[56] Fix | Delete
@host = v
[57] Fix | Delete
end
[58] Fix | Delete
[59] Fix | Delete
# do nothing
[60] Fix | Delete
def set_port(v)
[61] Fix | Delete
end
[62] Fix | Delete
[63] Fix | Delete
# raise InvalidURIError
[64] Fix | Delete
def check_userinfo(user)
[65] Fix | Delete
raise URI::InvalidURIError, "can not set userinfo for file URI"
[66] Fix | Delete
end
[67] Fix | Delete
[68] Fix | Delete
# raise InvalidURIError
[69] Fix | Delete
def check_user(user)
[70] Fix | Delete
raise URI::InvalidURIError, "can not set user for file URI"
[71] Fix | Delete
end
[72] Fix | Delete
[73] Fix | Delete
# raise InvalidURIError
[74] Fix | Delete
def check_password(user)
[75] Fix | Delete
raise URI::InvalidURIError, "can not set password for file URI"
[76] Fix | Delete
end
[77] Fix | Delete
[78] Fix | Delete
# do nothing
[79] Fix | Delete
def set_userinfo(v)
[80] Fix | Delete
end
[81] Fix | Delete
[82] Fix | Delete
# do nothing
[83] Fix | Delete
def set_user(v)
[84] Fix | Delete
end
[85] Fix | Delete
[86] Fix | Delete
# do nothing
[87] Fix | Delete
def set_password(v)
[88] Fix | Delete
end
[89] Fix | Delete
end
[90] Fix | Delete
[91] Fix | Delete
@@schemes['FILE'] = File
[92] Fix | Delete
end
[93] Fix | Delete
[94] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function