lib/net/sftp/protocol/01/attributes.rb
# Returns the type as a symbol, rather than an integer, for easier use in
# Ruby programs.
Returns the type as a symbol, rather than an integer, for easier use in
Ruby programs.
Returns the type as a symbol rather than an integer for easier use in Ruby programs .
def symbolic_type
      case type
      when T_SOCKET       then :socket
      when T_SYMLINK      then :symlink
      when T_REGULAR      then :regular
      when T_BLOCK_DEVICE then :block_device
      when T_DIRECTORY    then :directory
      when T_CHAR_DEVICE  then :char_device
      when T_FIFO         then :fifo
      when T_SPECIAL      then :special
      when T_UNKNOWN      then :unknown
      else raise NotImplementedError, "unknown file type #{type} (bug?)"
      end
    end
def symbolic_type case type when T_SOCKET then :socket when T_SYMLINK then :symlink when T_REGULAR then :regular when T_BLOCK_DEVICE then :block_device when T_DIRECTORY then :directory when T_CHAR_DEVICE then :char_device when T_FIFO then :fifo when T_SPECIAL then :special when T_UNKNOWN then :unknown else raise NotImplementedError , "unknown file type #{type} (bug?)" end end
Returns the type as a symbol, rather than an integer, for easier use in
Ruby programs.
Returns the type as a symbol rather than an integer for easier use in Ruby programs .