class SF::Ftp::Response
inherits Reference
#
Define a FTP response
Direct known subclasses
SF::Ftp::DirectoryResponse
SF::Ftp::ListingResponse
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
Methods#
#dup : Response
#
Returns a shallow copy of this object.
This allocates a new object and copies the contents of
self
into it.
#message : String
#
Get the full message contained in the response
Returns: The response message
#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
#status : Ftp::Response::Status
#
Get the status code of the response
Returns: Status code