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

Version 4 of the SFTP protocol made some pretty significant alterations to the File Attributes data type. This encapsulates those changes.

Methods

buffers   buffers   empty   from_buffer   from_hash   init   new   to_s  

Constants

F_SIZE = 0x00000001
F_PERMISSIONS = 0x00000004
F_ACCESSTIME = 0x00000008
F_CREATETIME = 0x00000010
F_MODIFYTIME = 0x00000020
F_ACL = 0x00000040
F_OWNERGROUP = 0x00000080
F_SUBSECOND_TIMES = 0x00000100
F_EXTENDED = 0x80000000
ACL = Struct.new( :type, :flag, :mask, :who )
T_REGULAR = 1
T_DIRECTORY = 2
T_SYMLINK = 3
T_SPECIAL = 4
T_UNKNOWN = 5
T_SOCKET = 6
T_CHAR_DEVICE = 7
T_BLOCK_DEVICE = 8
T_FIFO = 9

Attributes

acl  [RW] 
atime  [RW] 
atime_nseconds  [RW] 
ctime  [RW] 
ctime_nseconds  [RW] 
extended  [RW] 
group  [RW] 
mtime  [RW] 
mtime_nseconds  [RW] 
owner  [RW] 
permissions  [RW] 
size  [RW] 
type  [RW] 

Public Class methods

Return a reference to the buffer factory in use by this class.

Return an empty Attributes instance.

Return an Attributes instance initialized from the given buffer.

Create a new attributes object, initialized from the given hash. The :uid and :gid 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 names, and assigned (respectively) to :owner and :group.

An initializer for specifying the buffer factory that should be used by instances of this class.

Public Instance methods

A convenience for obtaining a reference to the buffer factory used by this instance‘s class.

Convert this object to a string, suitable for inclusion in an SFTP packet (protocol version 4+).

[Validate]