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. This particular class is specific to versions 6 and higher of the SFTP protocol.
To specify new attributes, just pass a hash as the argument to the constructor. The following keys are supported:
the type of the item (integer, one of the T_ constants)
the size of the item (integer)
the actual number of bytes that the item uses on disk (integer)
the user-id that owns the file (integer)
the group-id that owns the file (integer)
the name of the user that owns the file (string)
the name of the group that owns the file (string)
the permissions on the file (integer, e.g. 0755)
the access time of the file (integer, seconds since epoch)
the nanosecond component of atime (integer)
the time at which the file was created (integer, seconds since epoch)
the nanosecond component of createtime (integer)
the modification time of the file (integer, seconds since epoch)
the nanosecond component of mtime (integer)
the time that the file's attributes were last changed (integer)
the nanosecond component of ctime (integer)
an array of ACL entries for the item
other attributes of the file or directory (as a bit field) (integer)
a mask describing which bits in #attrib_bits are valid (integer)
whether the file may or may not contain textual data (integer)
the mime type of the file (string)
the hard link count of the file (integer)
the value of the filename before filename translation was attempted (string)
a hash of name/value pairs identifying extended info
Likewise, when the server sends an Attributes object, all of the above attributes are exposed as methods (though not all will be set with non-nil values from the server).
The size on-disk of the file
Other attributes of this file or directory (as a bit field)
A bit mask describing which bits in attrib_bits are valid
The time at which the file's attributes were last changed
The nanosecond component of ctime
The hard link count for the file
The mime-type of the file
Describes whether the file may or may not contain textual data
The value of the file name before filename translation was attempted