type (Net::SFTP::Protocol::V01::Attributes)

    # File lib/net/sftp/protocol/01/attributes.rb, line 208
        def type
          if    permissions & 0140000 == 0140000 then
            T_SOCKET
          elsif permissions & 0120000 == 0120000 then
            T_SYMLINK
          elsif permissions & 0100000 == 0100000 then
            T_REGULAR
          elsif permissions &  060000 ==  060000 then
            T_BLOCK_DEVICE
          elsif permissions &  040000 ==  040000 then
            T_DIRECTORY
          elsif permissions &  020000 ==  020000 then
            T_CHAR_DEVICE
          elsif permissions &  010000 ==  010000 then
            T_FIFO
          else
            T_UNKNOWN
          end
        end