Class: Net::SFTP::Protocol::V01::Name

### Home Classes Methods

### In Files

- lib/net/sftp/protocol/01/name.rb

### Parent

Object

### Methods

- ::new
- #directory?
- #file?
- #symlink?

### Files

- README.rdoc

### Class/Module Index

Quicksearch

- Net
- Net::SFTP
- Net::SFTP::Constants
- Net::SFTP::Constants::ACE
- Net::SFTP::Constants::ACE::Flag
- Net::SFTP::Constants::ACE::Mask
- Net::SFTP::Constants::ACE::Type
- Net::SFTP::Constants::LockTypes
- Net::SFTP::Constants::OpenFlags
- Net::SFTP::Constants::OpenFlags::FV1
- Net::SFTP::Constants::OpenFlags::FV5
- Net::SFTP::Constants::OpenFlags::FV6
- Net::SFTP::Constants::PacketTypes
- Net::SFTP::Constants::RenameFlags
- Net::SFTP::Constants::StatusCodes
- Net::SFTP::Exception
- Net::SFTP::Operations
- Net::SFTP::Operations::Dir
- Net::SFTP::Operations::Download
- Net::SFTP::Operations::File
- Net::SFTP::Operations::FileFactory
- Net::SFTP::Operations::Upload
- Net::SFTP::Packet
- Net::SFTP::Protocol
- Net::SFTP::Protocol::Base
- Net::SFTP::Protocol::V01
- Net::SFTP::Protocol::V01::Attributes
- Net::SFTP::Protocol::V01::Base
- Net::SFTP::Protocol::V01::Name
- Net::SFTP::Protocol::V02
- Net::SFTP::Protocol::V02::Base
- Net::SFTP::Protocol::V03
- Net::SFTP::Protocol::V03::Base
- Net::SFTP::Protocol::V04
- Net::SFTP::Protocol::V04::Attributes
- Net::SFTP::Protocol::V04::Base
- Net::SFTP::Protocol::V04::Name
- Net::SFTP::Protocol::V05
- Net::SFTP::Protocol::V05::Base
- Net::SFTP::Protocol::V06
- Net::SFTP::Protocol::V06::Attributes
- Net::SFTP::Protocol::V06::Base
- Net::SFTP::Request
- Net::SFTP::Response
- Net::SFTP::Session
- Net::SFTP::StatusException
- Net::SFTP::Version
- Net::SSH
- Net::SSH::Connection
- Net::SSH::Connection::Session

No matching classes.

# Net::SFTP::Protocol::V01::Name

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.

### Attributes

attributes[R]

The Attributes object describing this item.

longname[R]

The display-ready name of the item, possibly with other attributes.

name[R]

The name of the item on the remote server.

### Public Class Methods

new(name, longname, attributes) click to toggle source

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

### Public Instance Methods

directory?() click to toggle source

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

file?() click to toggle source

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

symlink?() click to toggle source

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

[Validate]

Generated with the Darkfish Rdoc Generator 2.