Class: RIO::FTP::Stream::RL

Inherits:
RL::URIBase show all
Defined in:
lib/rio/scheme/ftp.rb

Constant Summary

Constants inherited from RL::URIBase

RL::URIBase::HOST, RL::URIBase::SCHEME

Constants inherited from RL::WithPath

RL::WithPath::HOST, RL::WithPath::SCHEME

Instance Attribute Summary

Attributes inherited from RL::URIBase

#uri

Attributes inherited from RL::Base

#fs

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from RL::URIBase

#_get_base_from_arg, #_get_opts_from_args, #absolute?, #arg0_info_, #base, #base=, #host, #host=, #init_from_args_, #initialize, #initialize_copy, #join, #opaque, #path, #path=, #pathroot, #scheme, #to_s, #url, #urlpath, #urlpath=, #urlroot

Methods inherited from RL::WithPath

#_build, #_parts, #_uri, #abs, #base, #basename, #build_arg0_, #dirname, #filename, #fspath, #fspath=, #fspath_no_slash, #host, #host=, #is_root?, #join, #merge, #opaque, #path, #path=, #path_no_slash, #pathdepth, #pathroot, #route_from, #route_to, #scheme, #split, #uri, #uri_from_string_, #urlpath, #urlpath=

Methods included from Error::NotImplemented

#nodef

Methods inherited from RL::Base

#==, #===, #=~, #callstr, #close, #escape, #fs2url, #fspath, #initialize, #initialize_copy, is_riorl?, #length, parse, #path, #rl, split_riorl, subscheme, #to_rl, #to_s, #unescape, #url, #url2fs

Constructor Details

This class inherits a constructor from RIO::RL::URIBase

Class Method Details

.splitrl(s) ⇒ Object



77
78
79
80
# File 'lib/rio/scheme/ftp.rb', line 77

def self.splitrl(s) 
  sub,opq,whole = split_riorl(s)
  [whole] 
end

Instance Method Details

#file_rlObject



92
93
94
# File 'lib/rio/scheme/ftp.rb', line 92

def file_rl() 
  self
end

#open(m) ⇒ Object



84
85
86
87
88
89
90
91
# File 'lib/rio/scheme/ftp.rb', line 84

def open(m)
  case
  when m.primarily_write?
    RIO::IOH::Stream.new(RIO::FTP::FTPFile.new(fs.remote_path(@uri.to_s),fs.conn))
  else
    RIO::IOH::Stream.new(@uri.open)
  end
end

#openfs_Object



81
82
83
# File 'lib/rio/scheme/ftp.rb', line 81

def openfs_
  RIO::FTP::FS.create(@uri)
end