new2(user, password, host, port, path, typecode = nil, arg_check = true)
public
alternate initialization Creates a new URI::FTP
object.
Unlike build(), this method does
not escape the path component as required
by RFC1738; instead it is treated as per RFC2396.
Arguments are user, password, host, port, path, typecode, and arg_check, in
that order.
Show source
def self.new2(user, password, host, port, path,
typecode = nil, arg_check = true)
typecode = nil if typecode.size == 0
if typecode && !TYPECODE.include?(typecode)
raise ArgumentError,
"bad typecode is specified: #{typecode}"
end
self.new('ftp',
[user, password],
host, port, nil,
typecode ? path + TYPECODE_PREFIX + typecode : path,
nil, nil, nil, arg_check)
end