Class: SFML::FtpDirectoryResponse
- Inherits:
-
Object
- Object
- SFML::FtpDirectoryResponse
- Defined in:
- ext/network/ftp.c,
ext/network/ftp.c
Overview
An FtpResponse specialization returned by Ftp#working_directory, additionally carrying the directory path.
Instance Method Summary collapse
-
#directory ⇒ String
Through the UTF-32 entry point, so a path with non-ASCII characters survives the trip; the plain getter re-encodes it through the C locale.
-
#message ⇒ String
Returns the message sent by the server.
-
#ok? ⇒ Boolean
Returns
trueif the server reported success. -
#status ⇒ Integer
Returns the raw status code reported by the server.
-
#status_name ⇒ Symbol
Returns the status as an FtpStatus name.
Instance Method Details
#directory ⇒ String
Through the UTF-32 entry point, so a path with non-ASCII characters survives the trip; the plain getter re-encodes it through the C locale.
494 495 496 497 |
# File 'ext/network/ftp.c', line 494 static VALUE FtpDirectoryResponse_directory(VALUE self) { return utf32_to_rb( sfFtpDirectoryResponse_getDirectoryUnicode(Get_FtpDirectoryResponse_Struct(self))); } |
#message ⇒ String
Returns the message sent by the server.
482 483 484 485 |
# File 'ext/network/ftp.c', line 482 static VALUE FtpDirectoryResponse_message(VALUE self) { return rb_str_new_cstr( sfFtpDirectoryResponse_getMessage(Get_FtpDirectoryResponse_Struct(self))); } |
#ok? ⇒ Boolean
Returns true if the server reported success.
451 452 453 |
# File 'ext/network/ftp.c', line 451 static VALUE FtpDirectoryResponse_ok(VALUE self) { return BOOL2RB(sfFtpDirectoryResponse_isOk(Get_FtpDirectoryResponse_Struct(self))); } |
#status ⇒ Integer
Returns the raw status code reported by the server.
461 462 463 |
# File 'ext/network/ftp.c', line 461 static VALUE FtpDirectoryResponse_status(VALUE self) { return INT2NUM(sfFtpDirectoryResponse_getStatus(Get_FtpDirectoryResponse_Struct(self))); } |
#status_name ⇒ Symbol
Returns the status as an FtpStatus name.
471 472 473 474 |
# File 'ext/network/ftp.c', line 471 static VALUE FtpDirectoryResponse_status_name(VALUE self) { return ID2SYM(rb_intern( ftp_status_name(sfFtpDirectoryResponse_getStatus(Get_FtpDirectoryResponse_Struct(self))))); } |