Class: Net::SFTP::Protocol::V04::Name

Class | Net::SFTP::Protocol::V04::Name
In: | lib/net/sftp/protocol/04/name.rb
Parent: | Object

Represents a single named item on the remote server. This includes the name, and attributes about the item, and the "longname".

For backwards compatibility with the format and interface of the Name structure from previous protocol versions, this also exposes a longname method, which returns a string that can be used to display this item in a directory listing.

### Methods

directory? file? longname new symlink?

### Attributes

attributes | [R] | Attributes instance describing this item.
name | [R] | The name of the item on the remote server.

### Public Class methods

new(name, attributes)

Create a new Name object with the given name and attributes.

### Public Instance methods

directory?()

Returns `true` if the item is a directory.

file?()

Returns `true` if the item is a regular file.

longname()

Returns a string representing this file, in a format similar to that used by the unix "ls" utility.

symlink?()

Returns `true` if the item is a symlink.

[Validate]