Class URI::FTP
In: lib/uri/ftp.rb
Parent: Generic

RFC1738 section 3.2.

Methods

build   new   new2   set_typecode   to_s   typecode=  

Constants

DEFAULT_PORT = 21
COMPONENT = [ :scheme, :userinfo, :host, :port, :path, :typecode
TYPECODE = ['a', 'i', 'd'].freeze   Typecode is, "a", "i" or "d". As for "a" the text, as for "i" binary, as for "d" the directory is displayed. "A" with the text, as for "i" being binary, is because the respective data type was called ASCII and IMAGE with the protocol of FTP.
TYPECODE_PREFIX = ';type='.freeze

Attributes

typecode  [R] 

Public Class methods

Description

Creates a new URI::FTP object from components of URI::FTP with check. It is scheme, userinfo, host, port, path and typecode. It provided by an Array or a Hash. typecode is "a", "i" or "d".

Description

Create a new URI::FTP object from ``generic’’ components with no check.

Usage

  require 'uri'
  p ftp = URI.parse("ftp://ftp.ruby-lang.org/pub/ruby/;type=d")
  # => #<URI::FTP:0x201fad08 URL:ftp://ftp.ruby-lang.org/pub/ruby/;type=d>
  p ftp.typecode
  # => "d"

Public Instance methods

Protected Instance methods

To view or add comments on this documentation, please go to the API wiki.

[Validate]