Class: RIO::FTP::RRL

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

Instance Attribute Summary

Attributes inherited from RRL::Base

#fs, #uri

Instance Method Summary collapse

Methods inherited from RRL::URIBase

#initialize, #initialize_copy, parse

Methods inherited from RRL::WithPath

#absolute?, #base, #base=, #fspath_no_slash, #host, #host=, #opaque, #path, #path=, #path_no_slash, #pathdepth, #pathroot, #scheme, #split

Methods included from RIO::Fwd

#fwd, #fwd_reader, #fwd_readers, #fwd_writer, #fwd_writers

Methods included from Error::NotImplemented

#nodef

Methods inherited from RRL::Base

#==, #===, #=~, #callstr, #close, #initialize, #initialize_copy, #length, parse, #to_s, #url

Constructor Details

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

Instance Method Details

#_sup_args(arg0, *args) ⇒ Object



40
41
42
43
44
45
46
47
48
49
50
51
52
53
# File 'lib/rio/scheme/ftp.rb', line 40

def _sup_args(arg0,*args)
  if arg0 == 'ftp:'
    hn = args.shift || 'localhost'
    us = args.shift 
    pw = args.shift
    pt = args.shift || ''
    ph = args.shift || '/'
    tc = args.shift || ''
    u = URI::FTP.new2(us,pw,hn,pt,ph,tc)
    return [u]
  else
    return [arg0] + args
  end
end

#dir_rlObject



67
68
69
# File 'lib/rio/scheme/ftp.rb', line 67

def dir_rl() 
  self 
end

#file_rlObject



64
65
66
# File 'lib/rio/scheme/ftp.rb', line 64

def file_rl() 
  RIO::FTP::Stream::RRL.new(self.uri) 
end

#open(*args) ⇒ Object



61
62
63
# File 'lib/rio/scheme/ftp.rb', line 61

def open(*args)
  IOH::Dir.new(RIO::FTP::Dir::Stream.new(self.uri))
end

#openfs_Object



57
58
59
60
# File 'lib/rio/scheme/ftp.rb', line 57

def openfs_
  #p callstr('openfs_',self.uri)
  RIO::FTP::FS.create(self.uri)
end

#typecodeObject



54
# File 'lib/rio/scheme/ftp.rb', line 54

def typecode() uri.typecode end

#typecode=(val) ⇒ Object



55
# File 'lib/rio/scheme/ftp.rb', line 55

def typecode=(val) uri.typecode = val end