lib/net/sftp/protocol/01/attributes.rb
# Convert the object to a string suitable for passing in an SFTP
# packet. This is the raw representation of the attribute packet payload,
# and is not intended to be human readable.
Convert the object to a string suitable for passing in an SFTP
packet. This is the raw representation of the attribute packet payload,
and is not intended to be human readable.
Convert the object to a string suitable for passing in an SFTP packet . This is the raw representation of the attribute packet payload and is not intended to be human readable .
def to_s
      prepare_serialization!
      flags = 0
      self.class.elements.each do |name, type, condition|
        flags |= condition if attributes[name]
      end
      buffer = Net::SSH::Buffer.from(:long, flags)
      self.class.elements.each do |name, type, condition|
        if flags & condition == condition
          if type == :special
            send("encode_#{name}", buffer)
          else
            buffer.send("write_#{type}", attributes[name])
          end
        end
      end
      buffer.to_s
    end
def to_s prepare_serialization! flags = 0 self . class . elements . each do | name , type , condition | flags |= condition if attributes [ name ] end buffer = Net :: SSH :: Buffer . from ( :long , flags ) self . class . elements . each do | name , type , condition | if flags & condition == condition if type == :special send ( "encode_#{name}" , buffer ) else buffer . send ( "write_#{type}" , attributes [ name ] ) end end end buffer . to_s end
Convert the object to a string suitable for passing in an SFTP
packet.
Convert the object to a string suitable for passing in an SFTP packet .