lib/net/sftp/protocol/01/base.rb
# Parses the given FXP_NAME packet and returns a hash with one key, :names,
# which references an array of Name objects.
Parses the given FXP_NAME packet and returns a hash with one key, :names,
which references an array of Name objects.
Parses the given FXP_NAME packet and returns a hash with one key : names which references an array of Name objects .
def parse_name_packet(packet)
      names = []
      packet.read_long.times do
        filename = packet.read_string
        longname = packet.read_string
        attrs    = attribute_factory.from_buffer(packet)
        names   << name_factory.new(filename, longname, attrs)
      end
      { :names => names }
    end
def parse_name_packet ( packet ) names = [ ] packet . read_long . times do filename = packet . read_string longname = packet . read_string attrs = attribute_factory . from_buffer ( packet ) names << name_factory . new ( filename , longname , attrs ) end { :names => names } end
Parses the given FXP_NAME packet and returns a hash with one key, :names,
which references an array of Name objects.
Parses the given FXP_NAME packet and returns a hash with one key : names which references an array of Name objects .
packet
<not_specific>