class

SF::Ftp::Response

Inherits Reference / Object

Define a FTP response

Constructors

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
Source

Instance methods

dup

Returns a shallow copy of this object.

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

Source
finalize
Source
message

Get the full message contained in the response

Returns: The response message

Source
ok?

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

Source
status

Get the status code of the response

Returns: Status code

Source

Nested types