| Class | Net::SFTP::Protocol::V04::Attributes |
| In: |
lib/net/sftp/protocol/04/attributes.rb
lib/net/sftp/protocol/04/attributes.rb |
| Parent: | V01::Attributes |
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 4 and 5 of the SFTP protocol.
To specify new attributes, just pass a hash as the argument to the constructor. The following keys are supported:
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).
| F_ACCESSTIME | = | 0x00000008 | ||
| F_CREATETIME | = | 0x00000010 | ||
| F_MODIFYTIME | = | 0x00000020 | ||
| F_ACL | = | 0x00000040 | ||
| F_OWNERGROUP | = | 0x00000080 | ||
| F_SUBSECOND_TIMES | = | 0x00000100 | ||
| ACL | = | Struct.new(:type, :flag, :mask, :who) | A simple struct for representing a single entry in an Access Control List. (See Net::SFTP::Constants::ACE) | |
| F_ACCESSTIME | = | 0x00000008 | ||
| F_CREATETIME | = | 0x00000010 | ||
| F_MODIFYTIME | = | 0x00000020 | ||
| F_ACL | = | 0x00000040 | ||
| F_OWNERGROUP | = | 0x00000080 | ||
| F_SUBSECOND_TIMES | = | 0x00000100 | ||
| ACL | = | Struct.new(:type, :flag, :mask, :who) | A simple struct for representing a single entry in an Access Control List. (See Net::SFTP::Constants::ACE) |
| acl | [RW] | The array of access control entries for this item. |
| acl | [RW] | The array of access control entries for this item. |
| atime_nseconds | [RW] | The nanosecond component of the access time. |
| atime_nseconds | [RW] | The nanosecond component of the access time. |
| createtime | [RW] | The creation time of the remote item, in seconds since the epoch. |
| createtime | [RW] | The creation time of the remote item, in seconds since the epoch. |
| createtime_nseconds | [RW] | The nanosecond component of the creation time. |
| createtime_nseconds | [RW] | The nanosecond component of the creation time. |
| group | [W] | The group of the item on the remote server, as a string. |
| group | [W] | The group of the item on the remote server, as a string. |
| mtime_nseconds | [RW] | The nanosecond component of the modification time. |
| mtime_nseconds | [RW] | The nanosecond component of the modification time. |
| owner | [W] | The owner of the item on the remote server, as a string. |
| owner | [W] | The owner of the item on the remote server, as a string. |
| type | [RW] | The type of the item on the remote server. Must be one of the T_* constants. |
| type | [RW] | The type of the item on the remote server. Must be one of the T_* constants. |
Create a new Attributes instance with the given attributes. The following keys are supported:
All of them default to nil if omitted, except for type, which defaults to T_REGULAR.
# File lib/net/sftp/protocol/04/attributes.rb, line 124
124: def initialize(attributes={})
125: super
126: attributes[:type] ||= T_REGULAR
127: end
Create a new Attributes instance with the given attributes. The following keys are supported:
All of them default to nil if omitted, except for type, which defaults to T_REGULAR.
# File lib/net/sftp/protocol/04/attributes.rb, line 124
124: def initialize(attributes={})
125: super
126: attributes[:type] ||= T_REGULAR
127: end