class SF::Ftp::Response

Overview

Define a FTP response

Direct Known Subclasses

Defined in:

network/obj.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(code : Ftp::Response::Status = InvalidResponse, message : String = "") #

Default constructor

This constructor is used by the FTP client to build the response.

  • code - Response status code
  • message - Response message

[View source]

Instance Method Detail

def dup : Response #
Description copied from class Reference

Returns a shallow copy of this object.

This allocates a new object and copies the contents of self into it.


[View source]
def finalize #

[View source]
def message : String #

Get the full message contained in the response

Returns: The response message


[View source]
def ok? : Bool #

Check if the status code means a success

This function is defined for convenience, it is equivalent to testing if the status code is < 400.

Returns: True if the status is a success, false if it is a failure


[View source]
def status : Ftp::Response::Status #

Get the status code of the response

Returns: Status code


[View source]