Class Net::SFTP::Protocol::V_01::Attributes
In: lib/net/sftp/protocol/01/attributes.rb
Parent: Object

A class representing the attributes of a file or directory on the server. It may be used to specify new attributes, or to query existing attributes.

Methods

buffers   buffers   empty   from_buffer   from_hash   init   new   to_s  

Constants

F_SIZE = 0x00000001
F_UIDGID = 0x00000002
F_PERMISSIONS = 0x00000004
F_ACMODTIME = 0x00000008
F_EXTENDED = 0x80000000

Attributes

atime  [RW] 
extended  [RW] 
gid  [RW] 
mtime  [RW] 
permissions  [RW] 
size  [RW] 
uid  [RW] 

Public Class methods

Returns the buffer factory for this class.

Create a new, empty Attributes object.

Create a new Attributes object, initialized from the given buffer.

Create a new attributes object, initialized from the given hash. The :owner and :group attributes are treated specially; they are not actually supported by this version of the protocol, but are instead converted by this method to their corresponding id numbers, and assigned (respectively) to :uid and :gid.

An initialization routine, to grant the class (factory) access to a buffer factory. The buffer factory is used by the class’ to_s method to encode the object‘s attributes.

This returns self, making it suitable for chaining.

Public Instance methods

Returns the buffer factory for the object‘s class.

Convert the object to a string suitable for passing in an SFTP packet.

[Validate]