Module: Net::SFTP::Protocol

### Home Classes Methods

### In Files

- lib/net/sftp/protocol.rb
- lib/net/sftp/protocol/01/attributes.rb
- lib/net/sftp/protocol/01/base.rb
- lib/net/sftp/protocol/01/name.rb
- lib/net/sftp/protocol/02/base.rb
- lib/net/sftp/protocol/03/base.rb
- lib/net/sftp/protocol/04/attributes.rb
- lib/net/sftp/protocol/04/base.rb
- lib/net/sftp/protocol/04/name.rb
- lib/net/sftp/protocol/05/base.rb
- lib/net/sftp/protocol/06/attributes.rb
- lib/net/sftp/protocol/06/base.rb
- lib/net/sftp/protocol/base.rb

### Namespace

- MODULE Net::SFTP::Protocol::V01
- MODULE Net::SFTP::Protocol::V02
- MODULE Net::SFTP::Protocol::V03
- MODULE Net::SFTP::Protocol::V04
- MODULE Net::SFTP::Protocol::V05
- MODULE Net::SFTP::Protocol::V06
- CLASS Net::SFTP::Protocol::Base

### Methods

- ::load

### Files

- README.rdoc

### Class/Module Index

Quicksearch

- Net
- Net::SFTP
- Net::SFTP::Constants
- Net::SFTP::Constants::ACE
- Net::SFTP::Constants::ACE::Flag
- Net::SFTP::Constants::ACE::Mask
- Net::SFTP::Constants::ACE::Type
- Net::SFTP::Constants::LockTypes
- Net::SFTP::Constants::OpenFlags
- Net::SFTP::Constants::OpenFlags::FV1
- Net::SFTP::Constants::OpenFlags::FV5
- Net::SFTP::Constants::OpenFlags::FV6
- Net::SFTP::Constants::PacketTypes
- Net::SFTP::Constants::RenameFlags
- Net::SFTP::Constants::StatusCodes
- Net::SFTP::Exception
- Net::SFTP::Operations
- Net::SFTP::Operations::Dir
- Net::SFTP::Operations::Download
- Net::SFTP::Operations::File
- Net::SFTP::Operations::FileFactory
- Net::SFTP::Operations::Upload
- Net::SFTP::Packet
- Net::SFTP::Protocol
- Net::SFTP::Protocol::Base
- Net::SFTP::Protocol::V01
- Net::SFTP::Protocol::V01::Attributes
- Net::SFTP::Protocol::V01::Base
- Net::SFTP::Protocol::V01::Name
- Net::SFTP::Protocol::V02
- Net::SFTP::Protocol::V02::Base
- Net::SFTP::Protocol::V03
- Net::SFTP::Protocol::V03::Base
- Net::SFTP::Protocol::V04
- Net::SFTP::Protocol::V04::Attributes
- Net::SFTP::Protocol::V04::Base
- Net::SFTP::Protocol::V04::Name
- Net::SFTP::Protocol::V05
- Net::SFTP::Protocol::V05::Base
- Net::SFTP::Protocol::V06
- Net::SFTP::Protocol::V06::Attributes
- Net::SFTP::Protocol::V06::Base
- Net::SFTP::Request
- Net::SFTP::Response
- Net::SFTP::Session
- Net::SFTP::StatusException
- Net::SFTP::Version
- Net::SSH
- Net::SSH::Connection
- Net::SSH::Connection::Session

No matching classes.

# Net::SFTP::Protocol

The Protocol module contains the definitions for all supported SFTP protocol versions.

### Public Class Methods

load(session, version) click to toggle source

Instantiates and returns a new protocol driver instance for the given protocol version. `session` must be a valid SFTP session object, and `version` must be an integer. If an unsupported version is given, an exception will be raised.

    # File lib/net/sftp/protocol.rb, line 18
    def self.load(session, version)
      case version
      when 1 then V01::Base.new(session)
      when 2 then V02::Base.new(session)
      when 3 then V03::Base.new(session)
      when 4 then V04::Base.new(session)
      when 5 then V05::Base.new(session)
      when 6 then V06::Base.new(session)
      else raise NotImplementedError, "unsupported SFTP version #{version.inspect}"
      end
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.