Object
Represents a single named item on the remote server. This includes the name, attributes about the item, and the "longname", which is intended for use when displaying directory data, and has no specified format.
Create a new Name object with the given name, longname, and attributes.
# File lib/net/sftp/protocol/01/name.rb, line 17 def initialize(name, longname, attributes) @name, @longname, @attributes = name, longname, attributes end
Returns true if the item appears to be a directory. It does this by examining the attributes. If there is insufficient information in the attributes, this will return nil, rather than a boolean.
# File lib/net/sftp/protocol/01/name.rb, line 24 def directory? attributes.directory? end
Returns true if the item appears to be a regular file. It does this by examining the attributes. If there is insufficient information in the attributes, this will return nil, rather than a boolean.
# File lib/net/sftp/protocol/01/name.rb, line 38 def file? attributes.file? end
Returns true if the item appears to be a symlink. It does this by examining the attributes. If there is insufficient information in the attributes, this will return nil, rather than a boolean.
# File lib/net/sftp/protocol/01/name.rb, line 31 def symlink? attributes.symlink? end
Generated with the Darkfish Rdoc Generator 2.