\hypertarget{class_qore_1_1_ftp_client}{}\doxysection{Qore\+::Ftp\+Client Class Reference} \label{class_qore_1_1_ftp_client}\index{Qore::FtpClient@{Qore::FtpClient}} The \mbox{\hyperlink{class_qore_1_1_ftp_client}{Ftp\+Client}} class allows Qore code to communicate with FTP servers with the FTP and FTPS protocols. \doxysubsection*{Public Member Functions} \begin{DoxyCompactItemize} \item \mbox{\hyperlink{class_qore_1_1_ftp_client_a1732a34fe1f8349fc05ef113b3c5af08}{clear\+Stats}} () \begin{DoxyCompactList}\small\item\em Clears performance statistics. \end{DoxyCompactList}\item nothing \mbox{\hyperlink{class_qore_1_1_ftp_client_a3c4ed4f609453368ba483ead948d8cf9}{clear\+Warning\+Queue}} () \begin{DoxyCompactList}\small\item\em Removes any warning \mbox{\hyperlink{class_qore_1_1_thread_1_1_queue}{Queue}} object from the \mbox{\hyperlink{class_qore_1_1_socket}{Socket}}. \end{DoxyCompactList}\item nothing \mbox{\hyperlink{class_qore_1_1_ftp_client_aef811b62489b3f15a600acb662494b83}{connect}} () \begin{DoxyCompactList}\small\item\em Connects to the FTP server and attempts a login; if any errors occur, an exception is thrown. \end{DoxyCompactList}\item \mbox{\hyperlink{class_qore_1_1_ftp_client_aff2f101e24bfe52cf2a974aad462086a}{constructor}} () \begin{DoxyCompactList}\small\item\em Creates an empty \mbox{\hyperlink{class_qore_1_1_ftp_client}{Ftp\+Client}} object. \end{DoxyCompactList}\item \mbox{\hyperlink{class_qore_1_1_ftp_client_a3cf48b0ab77ae7744476aa0f642dc363}{constructor}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} url) \begin{DoxyCompactList}\small\item\em Creates an \mbox{\hyperlink{class_qore_1_1_ftp_client}{Ftp\+Client}} object and initializes it with a URL. \end{DoxyCompactList}\item \mbox{\hyperlink{class_qore_1_1_ftp_client_a5eb696dad8f1f62841533b5fefda127a}{copy}} () \begin{DoxyCompactList}\small\item\em Throws an exception to prevent copying of objects this class. \end{DoxyCompactList}\item nothing \mbox{\hyperlink{class_qore_1_1_ftp_client_af98c09ee337da6b7651c6d02fb207ed0}{cwd}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} path) \begin{DoxyCompactList}\small\item\em Changes the current working directory on the server. \end{DoxyCompactList}\item nothing \mbox{\hyperlink{class_qore_1_1_ftp_client_aaa29460512ce4c1630aef23ce645bee6}{del}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} remote\+\_\+path) \begin{DoxyCompactList}\small\item\em Deletes a file from the FTP server; if any errors occur, an exception is thrown. \end{DoxyCompactList}\item \mbox{\hyperlink{class_qore_1_1_ftp_client_aacbea70d0f883a92993b25f18ccf047d}{destructor}} () \begin{DoxyCompactList}\small\item\em Disconnects any remote connection and destroys the object. \end{DoxyCompactList}\item nothing \mbox{\hyperlink{class_qore_1_1_ftp_client_a7b4cd4c149f4330651e5590b5beddc27}{disconnect}} () \begin{DoxyCompactList}\small\item\em Disconnects from an FTP server. \end{DoxyCompactList}\item nothing \mbox{\hyperlink{class_qore_1_1_ftp_client_a2b06a66db173df6bac61b1af48c7a11c}{get}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} remote\+\_\+path, \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} local\+\_\+path) \begin{DoxyCompactList}\small\item\em Gets a file from the FTP server and stores it on the local filesystem; if any errors occur, an exception is thrown. \end{DoxyCompactList}\item nothing \mbox{\hyperlink{class_qore_1_1_ftp_client_a9d3b68c1dd8f2cf65e30435f9fc3e2dc}{get}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} remote\+\_\+path, \mbox{\hyperlink{class_qore_1_1_output_stream}{Qore\+::\+Output\+Stream}} os) \begin{DoxyCompactList}\small\item\em Gets a file from the FTP server and writes it to an \mbox{\hyperlink{class_qore_1_1_output_stream}{Output\+Stream}}; if any errors occur, an exception is thrown. \end{DoxyCompactList}\item \mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}} \mbox{\hyperlink{class_qore_1_1_ftp_client_a6884aa57e8750c09e029fb919a31b6dd}{get\+As\+Binary}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} remote\+\_\+path) \begin{DoxyCompactList}\small\item\em Gets a file from the FTP server and returns it as a binary. \end{DoxyCompactList}\item \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{class_qore_1_1_ftp_client_a61be0bf78d49b48578f1a800f1e95ae2}{get\+As\+String}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} remote\+\_\+path, \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} encoding) \begin{DoxyCompactList}\small\item\em Gets a file from the FTP server and returns it as a string. \end{DoxyCompactList}\item \mbox{\hyperlink{group__type__conversion__functions_ga0231dbb472dd230310af7c7c34f56e92}{hash}}$<$ auto $>$ \mbox{\hyperlink{class_qore_1_1_ftp_client_ab07b745d71fb0d9be7860fd41c9450c8}{get\+Control\+Peer\+Info}} (bool host\+\_\+lookup=\mbox{\hyperlink{group__boolean__constants_ga3ba2df91713a6249449347131ea526c3}{True}}) \begin{DoxyCompactList}\small\item\em Returns information about the remote end of the control socket as a hash. \end{DoxyCompactList}\item \mbox{\hyperlink{group__type__conversion__functions_ga0231dbb472dd230310af7c7c34f56e92}{hash}}$<$ auto $>$ \mbox{\hyperlink{class_qore_1_1_ftp_client_aa9bd9f5c986f891fa1e2021d426c0969}{get\+Control\+Socket\+Info}} (bool host\+\_\+lookup=\mbox{\hyperlink{group__boolean__constants_ga3ba2df91713a6249449347131ea526c3}{True}}) \begin{DoxyCompactList}\small\item\em Returns information about the local control socket as a hash. \end{DoxyCompactList}\item \mbox{\hyperlink{group__type__conversion__functions_ga0231dbb472dd230310af7c7c34f56e92}{hash}}$<$ auto $>$ \mbox{\hyperlink{class_qore_1_1_ftp_client_a4655d94c5f3a25d14098b65c21755d31}{get\+Data\+Peer\+Info}} (bool host\+\_\+lookup=\mbox{\hyperlink{group__boolean__constants_ga3ba2df91713a6249449347131ea526c3}{True}}) \begin{DoxyCompactList}\small\item\em Returns information about the remote data socket as a hash. \end{DoxyCompactList}\item \mbox{\hyperlink{group__type__conversion__functions_ga0231dbb472dd230310af7c7c34f56e92}{hash}}$<$ auto $>$ \mbox{\hyperlink{class_qore_1_1_ftp_client_a9c91cf56b957986b28ae36db98466d0b}{get\+Data\+Socket\+Info}} (bool host\+\_\+lookup=\mbox{\hyperlink{group__boolean__constants_ga3ba2df91713a6249449347131ea526c3}{True}}) \begin{DoxyCompactList}\small\item\em Returns information about the local data socket as a hash. \end{DoxyCompactList}\item \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{class_qore_1_1_ftp_client_af7aca96e8290a8c086659b10ee5aa410}{get\+Host\+Name}} () \begin{DoxyCompactList}\small\item\em Returns the current hostname value or \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} if none is set. \end{DoxyCompactList}\item \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{class_qore_1_1_ftp_client_abe7fe74d0bf2ea11fdedc5f0c67af5dc}{get\+Mode}} () \begin{DoxyCompactList}\small\item\em returns a string for the connection mode\+: {\ttfamily \char`\"{}port\char`\"{}}, {\ttfamily \char`\"{}pasv\char`\"{}}, {\ttfamily \char`\"{}epsv\char`\"{}}, or {\ttfamily \char`\"{}auto\char`\"{}} if not connected and auto mode is set \end{DoxyCompactList}\item \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{class_qore_1_1_ftp_client_a288bbef821ce9641b0175a2052680001}{get\+Network\+Family}} () \begin{DoxyCompactList}\small\item\em Returns the network address family to use for new connections. \end{DoxyCompactList}\item \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{class_qore_1_1_ftp_client_ae1c299c9e3d8b5cc965d1fd61d588823}{get\+Password}} () \begin{DoxyCompactList}\small\item\em Returns the current password value or \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} if none is set. \end{DoxyCompactList}\item \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{class_qore_1_1_ftp_client_a73e0baafad3d0b0e38d659b31fbb1423}{get\+Port}} () \begin{DoxyCompactList}\small\item\em Retrieves the current connection port value for this object. \end{DoxyCompactList}\item \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{class_qore_1_1_ftp_client_adb91e4ad74569ef20a4b53e507bf0ad9}{get\+SSLCipher\+Name}} () \begin{DoxyCompactList}\small\item\em Returns the name of the cipher for an encrypted connection or \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} if an encrypted connection is not established. \end{DoxyCompactList}\item \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{class_qore_1_1_ftp_client_a44b230cef51f054d0bc89a7ebb237b4b}{get\+SSLCipher\+Version}} () \begin{DoxyCompactList}\small\item\em Returns the version of the cipher for an encrypted connection or \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} if an encrypted connection is not established. \end{DoxyCompactList}\item \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{class_qore_1_1_ftp_client_ac53196ba6703b4dab58cd33cd007bf32}{get\+Timeout}} () \begin{DoxyCompactList}\small\item\em returns the socket I/O timeout value as an integer in milliseconds \end{DoxyCompactList}\item \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{class_qore_1_1_ftp_client_a3becc28023f121a7aa3c40a4c396a602}{get\+URL}} () \begin{DoxyCompactList}\small\item\em Retrieves the current connection URL string for this object. \end{DoxyCompactList}\item \mbox{\hyperlink{group__type__conversion__functions_ga0231dbb472dd230310af7c7c34f56e92}{hash}} \mbox{\hyperlink{class_qore_1_1_ftp_client_a8734c1ff4459851cbc320443d3b921e6}{get\+Usage\+Info}} () \begin{DoxyCompactList}\small\item\em Returns performance statistics for the socket. \end{DoxyCompactList}\item \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{class_qore_1_1_ftp_client_a4ae45142fe54a12f9548154b8f8e2c1e}{get\+User\+Name}} () \begin{DoxyCompactList}\small\item\em Returns the current username value or \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} if none is set. \end{DoxyCompactList}\item bool \mbox{\hyperlink{class_qore_1_1_ftp_client_a3025f2ac95d03d4e744de82b5a26ad9a}{is\+Data\+Secure}} () \begin{DoxyCompactList}\small\item\em Returns \mbox{\hyperlink{basic_data_types_True}{True}} if the data connections are secure TLS/\+SSL connections, \mbox{\hyperlink{basic_data_types_False}{False}} if not. \end{DoxyCompactList}\item bool \mbox{\hyperlink{class_qore_1_1_ftp_client_ad6b30ff57e39fc5aa580d20b135195d9}{is\+Secure}} () \begin{DoxyCompactList}\small\item\em Returns \mbox{\hyperlink{basic_data_types_True}{True}} if the control connection is a secure TLS/\+SSL connection, \mbox{\hyperlink{basic_data_types_False}{False}} if not. \end{DoxyCompactList}\item \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{class_qore_1_1_ftp_client_a21409b36294103779bba4f872e6ff8aa}{list}} () \begin{DoxyCompactList}\small\item\em Returns a list of files from the FTP server in the server\textquotesingle{}s long format in the current working directory or \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} if the path cannot be found. \end{DoxyCompactList}\item \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{class_qore_1_1_ftp_client_ad987cf2d506bb966f7886425abd8d23c}{list}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} path) \begin{DoxyCompactList}\small\item\em Returns a list of files from the FTP server in the server\textquotesingle{}s long format for the given path or \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} if the path cannot be found. \end{DoxyCompactList}\item nothing \mbox{\hyperlink{class_qore_1_1_ftp_client_a8d0ae5b88c272e4ae0f5113c5ae0d835}{mkdir}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} remote\+\_\+path) \begin{DoxyCompactList}\small\item\em Creates a directory on the FTP server; if any errors occur, an exception is thrown. \end{DoxyCompactList}\item \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{class_qore_1_1_ftp_client_aa4905e4a78ade8053e709f094a7ed705}{nlst}} () \begin{DoxyCompactList}\small\item\em Returns a list of file names from the FTP server in the current working directory or \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} if the path cannot be found. \end{DoxyCompactList}\item \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{class_qore_1_1_ftp_client_a734bc75154487b7344b36f2d2eed84ae}{nlst}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} path) \begin{DoxyCompactList}\small\item\em Returns a list of file names from the FTP server for the given path or \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} if the path cannot be found. \end{DoxyCompactList}\item nothing \mbox{\hyperlink{class_qore_1_1_ftp_client_a835c52e32ee089773d48574f297e7965}{put}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} local\+\_\+path, \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} remote\+\_\+path) \begin{DoxyCompactList}\small\item\em Transfers a local file to the FTP server; if any errors occur, an exception is thrown. \end{DoxyCompactList}\item nothing \mbox{\hyperlink{class_qore_1_1_ftp_client_ac44baa2151f3a892bc96abe6d0e54714}{put}} (\mbox{\hyperlink{class_qore_1_1_input_stream}{Qore\+::\+Input\+Stream}} is, \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} remote\+\_\+path) \begin{DoxyCompactList}\small\item\em Transfers the content of an \mbox{\hyperlink{class_qore_1_1_input_stream}{Input\+Stream}} to the FTP server; if any errors occur, an exception is thrown. \end{DoxyCompactList}\item nothing \mbox{\hyperlink{class_qore_1_1_ftp_client_aeb0580e5a740c437a18329ee6fab03f8}{put\+Data}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} data, \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} remote\+\_\+path) \begin{DoxyCompactList}\small\item\em Transfers string data to the FTP server and saves it as a file on the remote machine; if any errors occur, an exception is thrown. \end{DoxyCompactList}\item nothing \mbox{\hyperlink{class_qore_1_1_ftp_client_a3434ced4c5c1c62a03e7722abcb24cfc}{put\+Data}} (\mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}} data, \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} remote\+\_\+path) \begin{DoxyCompactList}\small\item\em Transfers binary data to the FTP server and saves it as a file on the remote machine; if any errors occur, an exception is thrown. \end{DoxyCompactList}\item \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{class_qore_1_1_ftp_client_a50427e074d3f14757491ad26295d7e6b}{pwd}} () \begin{DoxyCompactList}\small\item\em Returns the server-\/side current working directory. \end{DoxyCompactList}\item nothing \mbox{\hyperlink{class_qore_1_1_ftp_client_ac860bd11c765ed26e9f94bdc359c0d9e}{rename}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} from, \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} to) \begin{DoxyCompactList}\small\item\em Renames/moves a file or directory; if any errors occur, an exception is thrown. \end{DoxyCompactList}\item nothing \mbox{\hyperlink{class_qore_1_1_ftp_client_ac375463bf297a16943a1cd63d3be3068}{rmdir}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} remote\+\_\+path) \begin{DoxyCompactList}\small\item\em Removes a directory on the remote FTP server; if any errors occur, an exception is thrown. \end{DoxyCompactList}\item \mbox{\hyperlink{group__type__conversion__functions_ga0231dbb472dd230310af7c7c34f56e92}{hash}}$<$ \mbox{\hyperlink{struct_qore_1_1_ftp_response_info}{Ftp\+Response\+Info}} $>$ \mbox{\hyperlink{class_qore_1_1_ftp_client_a39423f304cf2777d89ba866dc3de5181}{send\+Control\+Message}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} cmd, \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} arg) \begin{DoxyCompactList}\small\item\em Sends a message on the control connection with a reply on the control connection only. \end{DoxyCompactList}\item nothing \mbox{\hyperlink{class_qore_1_1_ftp_client_a8e7b3685bc3ac840bf64896f7d1868c3}{set\+Control\+Event\+Queue}} () \begin{DoxyCompactList}\small\item\em Clears any Queue object that may be set on the \mbox{\hyperlink{class_qore_1_1_ftp_client}{Ftp\+Client}} object so that \mbox{\hyperlink{event_handling}{I/O events}} are no longer captured on the object on the control connection. \end{DoxyCompactList}\item nothing \mbox{\hyperlink{class_qore_1_1_ftp_client_ae51ff78ef9a8f84af0e59ebd6065cc99}{set\+Control\+Event\+Queue}} (\mbox{\hyperlink{class_qore_1_1_thread_1_1_queue}{Qore\+::\+Thread\+::\+Queue}} queue, auto arg, \+\_\+\+\_\+7\+\_\+ bool with\+\_\+data) \begin{DoxyCompactList}\small\item\em Sets a Queue object to receive \mbox{\hyperlink{class_qore_1_1_ftp_client}{Ftp\+Client}} and \mbox{\hyperlink{class_qore_1_1_socket}{Socket}} events on the control connection. \end{DoxyCompactList}\item nothing \mbox{\hyperlink{class_qore_1_1_ftp_client_a653ffafc1bd4b8da05f9ce18cc7fe854}{set\+Data\+Event\+Queue}} () \begin{DoxyCompactList}\small\item\em Clears any Queue object that may be set on the \mbox{\hyperlink{class_qore_1_1_ftp_client}{Ftp\+Client}} object so that \mbox{\hyperlink{event_handling}{I/O events}} are no longer captured on the object on the data connection. \end{DoxyCompactList}\item nothing \mbox{\hyperlink{class_qore_1_1_ftp_client_a5f8cd2947b40c6cec7d24e96aa02b485}{set\+Data\+Event\+Queue}} (\mbox{\hyperlink{class_qore_1_1_thread_1_1_queue}{Qore\+::\+Thread\+::\+Queue}} queue, auto arg, \+\_\+\+\_\+7\+\_\+ bool with\+\_\+data) \begin{DoxyCompactList}\small\item\em Sets a Queue object to receive \mbox{\hyperlink{class_qore_1_1_ftp_client}{Ftp\+Client}} and \mbox{\hyperlink{class_qore_1_1_socket}{Socket}} events on the data connection. \end{DoxyCompactList}\item nothing \mbox{\hyperlink{class_qore_1_1_ftp_client_a105c9076a7dd0e0cd58b0a562545cb77}{set\+Event\+Queue}} () \begin{DoxyCompactList}\small\item\em Clears any Queue object that may be set on the \mbox{\hyperlink{class_qore_1_1_ftp_client}{Ftp\+Client}} object so that \mbox{\hyperlink{event_handling}{I/O events}} are no longer captured on the object on either the data or control connections. \end{DoxyCompactList}\item nothing \mbox{\hyperlink{class_qore_1_1_ftp_client_a17b15d37c6dce414ef13e374f2d39b8d}{set\+Event\+Queue}} (\mbox{\hyperlink{class_qore_1_1_thread_1_1_queue}{Qore\+::\+Thread\+::\+Queue}} queue, auto arg, \+\_\+\+\_\+7\+\_\+ bool with\+\_\+data) \begin{DoxyCompactList}\small\item\em Sets a Queue object to receive \mbox{\hyperlink{class_qore_1_1_ftp_client}{Ftp\+Client}} and \mbox{\hyperlink{class_qore_1_1_socket}{Socket}} events on both the data and control connections. \end{DoxyCompactList}\item nothing \mbox{\hyperlink{class_qore_1_1_ftp_client_ab32919fb108c2ccfd9b7c7f019c643b2}{set\+Host\+Name}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} host) \begin{DoxyCompactList}\small\item\em Sets the hostname or address to use to connect to for the next connection. \end{DoxyCompactList}\item nothing \mbox{\hyperlink{class_qore_1_1_ftp_client_ae21b39b2a5d10f7f43373079f21fe037}{set\+Insecure}} () \begin{DoxyCompactList}\small\item\em Make a non-\/encrypted connection to the server on the next connect. \end{DoxyCompactList}\item nothing \mbox{\hyperlink{class_qore_1_1_ftp_client_a6a996c6bac1918d38e2088261500fcef}{set\+Insecure\+Data}} () \begin{DoxyCompactList}\small\item\em Make a non-\/encrypted data connection to the server on the next connect even if the control connection is secure. \end{DoxyCompactList}\item nothing \mbox{\hyperlink{class_qore_1_1_ftp_client_acc11045af149c681bb3a1ddd1657ca36}{set\+Mode\+Auto}} () \begin{DoxyCompactList}\small\item\em Sets the object to automatically try to negotiate the data connections in {\ttfamily EPSV}, {\ttfamily PASV}, and {\ttfamily PORT} modes, in that order. \end{DoxyCompactList}\item nothing \mbox{\hyperlink{class_qore_1_1_ftp_client_a9dd1291cef32804febcdf577ac537424}{set\+Mode\+EPSV}} () \begin{DoxyCompactList}\small\item\em Sets the object to only try to make data connections using {\ttfamily EPSV} (\href{http://tools.ietf.org/html/rfc2428}{\texttt{ RFC-\/2428}} extended passive) mode. \end{DoxyCompactList}\item nothing \mbox{\hyperlink{class_qore_1_1_ftp_client_a1c622625f391e801b4af7bf802c577cf}{set\+Mode\+PASV}} () \begin{DoxyCompactList}\small\item\em Sets the object to only try to make data connections using {\ttfamily PASV} (\href{http://tools.ietf.org/html/rfc959}{\texttt{ RFC-\/959}} passive) mode. \end{DoxyCompactList}\item nothing \mbox{\hyperlink{class_qore_1_1_ftp_client_ae66f4b1496453fb2f101c86c868742f4}{set\+Mode\+PORT}} () \begin{DoxyCompactList}\small\item\em Sets the object to only try to make data connections using {\ttfamily PORT} mode. \end{DoxyCompactList}\item nothing \mbox{\hyperlink{class_qore_1_1_ftp_client_a1ced03072c695abf25df4d419b64dfa0}{set\+Network\+Family}} (\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} family) \begin{DoxyCompactList}\small\item\em Sets the network address family to use for new connections; use this method to restrict connections to IPv4 or IPv6 connections. \end{DoxyCompactList}\item nothing \mbox{\hyperlink{class_qore_1_1_ftp_client_afbbcc2baf05d46c3f96fa2d2f8546d86}{set\+Password}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} pass) \begin{DoxyCompactList}\small\item\em Sets the password to use for the next connection. \end{DoxyCompactList}\item nothing \mbox{\hyperlink{class_qore_1_1_ftp_client_aab84947c2e5f474714f0456163954d60}{set\+Port}} (\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} port) \begin{DoxyCompactList}\small\item\em Sets the control port value to use for the next connection (the FTP protocol default is 21) \end{DoxyCompactList}\item nothing \mbox{\hyperlink{class_qore_1_1_ftp_client_a093c4791c32406da7f141f68fb0ced9b}{set\+Secure}} (bool secure=\mbox{\hyperlink{group__boolean__constants_ga3ba2df91713a6249449347131ea526c3}{True}}) \begin{DoxyCompactList}\small\item\em Make an FTPS connection to the server on the next connect if the argument is \mbox{\hyperlink{basic_data_types_True}{True}}. \end{DoxyCompactList}\item \mbox{\hyperlink{class_qore_1_1_ftp_client_a024e4f784381a2ff516e204e7bd9f383}{set\+Timeout}} (timeout timeout\+\_\+ms) \begin{DoxyCompactList}\small\item\em sets the socket I/O timeout value in milliseconds \end{DoxyCompactList}\item nothing \mbox{\hyperlink{class_qore_1_1_ftp_client_a592c70037c05cbe3e89172c2d8c4883a}{set\+URL}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} url) \begin{DoxyCompactList}\small\item\em Sets the connection and login parameters based on the URL passed as an argument. \end{DoxyCompactList}\item nothing \mbox{\hyperlink{class_qore_1_1_ftp_client_a15efd0f6d729a01eb39ca0a53a200c73}{set\+User\+Name}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} user) \begin{DoxyCompactList}\small\item\em Sets the user name to use for the next connection. \end{DoxyCompactList}\item nothing \mbox{\hyperlink{class_qore_1_1_ftp_client_a49a2e47cde50ae8bbcbca8721199dd16}{set\+Warning\+Queue}} (\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} warning\+\_\+ms, \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} warning\+\_\+bs, Queue queue, auto arg, timeout min\+\_\+ms=1s) \begin{DoxyCompactList}\small\item\em Sets a \mbox{\hyperlink{class_qore_1_1_thread_1_1_queue}{Queue}} object to receive socket warnings. \end{DoxyCompactList}\item \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{class_qore_1_1_ftp_client_a7c9034e745129d08ee0eacf554616232}{verify\+Peer\+Certificate}} () \begin{DoxyCompactList}\small\item\em Returns a string code giving the result of verifying the remote certificate or \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} if an encrypted connection is not established. \end{DoxyCompactList}\end{DoxyCompactItemize} \doxysubsection{Detailed Description} The \mbox{\hyperlink{class_qore_1_1_ftp_client}{Ftp\+Client}} class allows Qore code to communicate with FTP servers with the FTP and FTPS protocols. \begin{DoxyParagraph}{Restrictions\+:} \mbox{\hyperlink{group__parse__options_ga20400e83c6271a294a48b15a8f952efa}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+NETWORK}} \end{DoxyParagraph} The constructor takes an optional URL with the following format\+:~\newline {\ttfamily \mbox{[}(ftp$\vert$ftps)\+://\mbox{]}\mbox{[}}{\itshape username}{\ttfamily \mbox{[}\+:}{\itshape password}{\ttfamily \mbox{]}@\mbox{]}}{\itshape hostname}{\ttfamily \mbox{[}\+:}{\itshape port}{\ttfamily \mbox{]}} If the URL is not set with the constructor, then the connection parameters must be set with the Ftp\+Client\+::set$\ast$() methods. At the very minimum the hostname must be set. If any path name is given in the URL, it is ignored. See the following table for default URL parameters. {\bfseries{\mbox{\hyperlink{class_qore_1_1_ftp_client_aff2f101e24bfe52cf2a974aad462086a}{Ftp\+Client\+::constructor()}} Default URL Parameters}} \tabulinesep=1mm \begin{longtabu}spread 0pt [c]{*{2}{|X[-1]}|} \hline {\bfseries{Field}} &{\bfseries{Default Value}} \\\cline{1-2} {\ttfamily protocol} &{\ttfamily \char`\"{}ftp\char`\"{}} (unencrypted) \\\cline{1-2} {\ttfamily username} &{\ttfamily \char`\"{}anonymous\char`\"{}} \\\cline{1-2} {\ttfamily password} &{\ttfamily \char`\"{}qore@nohost.\+com\char`\"{}} \\\cline{1-2} {\ttfamily port} &{\ttfamily 21} \\\cline{1-2} \end{longtabu} Once the URL (at least the hostname) has been set, any method requiring a connection will make an implicit call to \mbox{\hyperlink{class_qore_1_1_ftp_client_aef811b62489b3f15a600acb662494b83}{Ftp\+Client\+::connect()}} to attempt to connect and login to the FTP server before executing the method. Objects of this class are capable of making encrypted FTPS connections according to \href{http://tools.ietf.org/html/rfc4217}{\texttt{ RFC-\/4217}}. TLS/\+SSL encrypted control and data connection will be attempted if the protocol is set to {\ttfamily \char`\"{}ftps\char`\"{}} or the \mbox{\hyperlink{class_qore_1_1_ftp_client_a093c4791c32406da7f141f68fb0ced9b}{Ftp\+Client\+::set\+Secure()}} method is called before connecting. Note that {\ttfamily \char`\"{}sftp\char`\"{}}, or FTP over ssh, is not supported with this class; FTPS is an extension of the FTP protocol to allow for secure connections; while {\ttfamily \char`\"{}sftp\char`\"{}} is FTP over an encrypted ssh connection. For sftp and ssh support, use the ssh2 module. When a data connection is required, by default the following modes are tried in series\+: \begin{DoxyItemize} \item {\ttfamily EPSV} (Extended Passive Mode) \item {\ttfamily PASV} (Passive Mode) \item {\ttfamily PORT} (Port mode) \end{DoxyItemize} If the FTP server does not support one of these methods, or network conditions do not allow a data connection of any of these types to be established, then an exception is thrown. To manually control which modes are tried, see the \mbox{\hyperlink{class_qore_1_1_ftp_client_a9dd1291cef32804febcdf577ac537424}{Ftp\+Client\+::set\+Mode\+EPSV()}}, \mbox{\hyperlink{class_qore_1_1_ftp_client_a1c622625f391e801b4af7bf802c577cf}{Ftp\+Client\+::set\+Mode\+PASV()}}, and \mbox{\hyperlink{class_qore_1_1_ftp_client_ae66f4b1496453fb2f101c86c868742f4}{Ftp\+Client\+::set\+Mode\+PORT()}} methods. This class supports posting network events to a Queue, either events on the control or data channels or both can be monitored. See \mbox{\hyperlink{event_handling}{I/O Event Handling}} for more information. The events raised by this object are listed in the following table\+: {\bfseries{\mbox{\hyperlink{class_qore_1_1_ftp_client}{Ftp\+Client}} Events}} \tabulinesep=1mm \begin{longtabu}spread 0pt [c]{*{3}{|X[-1]}|} \hline {\bfseries{Name}} &{\bfseries{Value}} &{\bfseries{Description}} \\\cline{1-3} \mbox{\hyperlink{event_handling_EVENT_FTP_SEND_MESSAGE}{EVENT\+\_\+\+FTP\+\_\+\+SEND\+\_\+\+MESSAGE}} &{\ttfamily 9} &Raised immediately before an FTP control message is sent \\\cline{1-3} \mbox{\hyperlink{event_handling_EVENT_FTP_MESSAGE_RECEIVED}{EVENT\+\_\+\+FTP\+\_\+\+MESSAGE\+\_\+\+RECEIVED}} &{\ttfamily 10} &Raised when an FTP reply is received on the control channel \\\cline{1-3} \end{longtabu} \hypertarget{class_qore_1_1_ftp_client_ftpclient_timeouts}{}\doxysubsection{Ftp\+Client Timeouts}\label{class_qore_1_1_ftp_client_ftpclient_timeouts} \mbox{\hyperlink{class_qore_1_1_ftp_client}{Ftp\+Client}} objects have a default socket I/O timeout value of 60 seconds. The following methods can be used to set or retrieve the socket I/O timeout value\+: \begin{DoxyItemize} \item \mbox{\hyperlink{class_qore_1_1_ftp_client_ac53196ba6703b4dab58cd33cd007bf32}{Ftp\+Client\+::get\+Timeout()}} \item \mbox{\hyperlink{class_qore_1_1_ftp_client_a024e4f784381a2ff516e204e7bd9f383}{Ftp\+Client\+::set\+Timeout()}} \end{DoxyItemize} \begin{DoxyNote}{Note} This class is not available with the \mbox{\hyperlink{group__parse__options_ga20400e83c6271a294a48b15a8f952efa}{PO\+\_\+\+NO\+\_\+\+NETWORK}} parse option. \end{DoxyNote} \doxysubsection{Member Function Documentation} \mbox{\Hypertarget{class_qore_1_1_ftp_client_a1732a34fe1f8349fc05ef113b3c5af08}\label{class_qore_1_1_ftp_client_a1732a34fe1f8349fc05ef113b3c5af08}} \index{Qore::FtpClient@{Qore::FtpClient}!clearStats@{clearStats}} \index{clearStats@{clearStats}!Qore::FtpClient@{Qore::FtpClient}} \doxysubsubsection{\texorpdfstring{clearStats()}{clearStats()}} {\footnotesize\ttfamily Qore\+::\+Ftp\+Client\+::clear\+Stats (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})} Clears performance statistics. \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{ftp.clearStats();} \end{DoxyCode} \end{DoxyParagraph} \begin{DoxySince}{Since} Qore 0.\+8.\+9 \end{DoxySince} \begin{DoxySeeAlso}{See also} \mbox{\hyperlink{class_qore_1_1_ftp_client_a8734c1ff4459851cbc320443d3b921e6}{Ftp\+Client\+::get\+Usage\+Info()}} \end{DoxySeeAlso} \mbox{\Hypertarget{class_qore_1_1_ftp_client_a3c4ed4f609453368ba483ead948d8cf9}\label{class_qore_1_1_ftp_client_a3c4ed4f609453368ba483ead948d8cf9}} \index{Qore::FtpClient@{Qore::FtpClient}!clearWarningQueue@{clearWarningQueue}} \index{clearWarningQueue@{clearWarningQueue}!Qore::FtpClient@{Qore::FtpClient}} \doxysubsubsection{\texorpdfstring{clearWarningQueue()}{clearWarningQueue()}} {\footnotesize\ttfamily nothing Qore\+::\+Ftp\+Client\+::clear\+Warning\+Queue (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})} Removes any warning \mbox{\hyperlink{class_qore_1_1_thread_1_1_queue}{Queue}} object from the \mbox{\hyperlink{class_qore_1_1_socket}{Socket}}. \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{ftp.clearWarningQueue();} \end{DoxyCode} \end{DoxyParagraph} \begin{DoxySeeAlso}{See also} \mbox{\hyperlink{class_qore_1_1_ftp_client_a49a2e47cde50ae8bbcbca8721199dd16}{Ftp\+Client\+::set\+Warning\+Queue()}} \end{DoxySeeAlso} \begin{DoxySince}{Since} Qore 0.\+8.\+9 \end{DoxySince} \mbox{\Hypertarget{class_qore_1_1_ftp_client_aef811b62489b3f15a600acb662494b83}\label{class_qore_1_1_ftp_client_aef811b62489b3f15a600acb662494b83}} \index{Qore::FtpClient@{Qore::FtpClient}!connect@{connect}} \index{connect@{connect}!Qore::FtpClient@{Qore::FtpClient}} \doxysubsubsection{\texorpdfstring{connect()}{connect()}} {\footnotesize\ttfamily nothing Qore\+::\+Ftp\+Client\+::connect (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})} Connects to the FTP server and attempts a login; if any errors occur, an exception is thrown. This method does not need to be called explicitly; connections are established implicitly by all methdods that communicate with FTP servers. Connection parameters are set in the constructor or in the Ftp\+Client\+::set$\ast$() methods \begin{DoxyParagraph}{Events\+:} \mbox{\hyperlink{event_handling_EVENT_CONNECTING}{EVENT\+\_\+\+CONNECTING}}, \mbox{\hyperlink{event_handling_EVENT_CONNECTED}{EVENT\+\_\+\+CONNECTED}}, \mbox{\hyperlink{event_handling_EVENT_HOSTNAME_LOOKUP}{EVENT\+\_\+\+HOSTNAME\+\_\+\+LOOKUP}}, \mbox{\hyperlink{event_handling_EVENT_HOSTNAME_RESOLVED}{EVENT\+\_\+\+HOSTNAME\+\_\+\+RESOLVED}}, \mbox{\hyperlink{event_handling_EVENT_START_SSL}{EVENT\+\_\+\+START\+\_\+\+SSL}}, \mbox{\hyperlink{event_handling_EVENT_SSL_ESTABLISHED}{EVENT\+\_\+\+SSL\+\_\+\+ESTABLISHED}}, \mbox{\hyperlink{event_handling_EVENT_FTP_SEND_MESSAGE}{EVENT\+\_\+\+FTP\+\_\+\+SEND\+\_\+\+MESSAGE}}, \mbox{\hyperlink{event_handling_EVENT_FTP_MESSAGE_RECEIVED}{EVENT\+\_\+\+FTP\+\_\+\+MESSAGE\+\_\+\+RECEIVED}}, \mbox{\hyperlink{event_handling_EVENT_PACKET_READ}{EVENT\+\_\+\+PACKET\+\_\+\+READ}}, \mbox{\hyperlink{event_handling_EVENT_PACKET_SENT}{EVENT\+\_\+\+PACKET\+\_\+\+SENT}} \end{DoxyParagraph} \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{ftp.connect();} \end{DoxyCode} \end{DoxyParagraph} \begin{DoxyExceptions}{Exceptions} {\em FTP-\/\+RESPONSE-\/\+ERROR} & Invalid response received from FTP server \\ \hline {\em SOCKET-\/\+CONNECT-\/\+ERROR} & Cannot establish socket connection to FTP server \\ \hline {\em FTP-\/\+CONNECT-\/\+ERROR} & no hostname set, FTP server reported an error, etc \\ \hline {\em FTP-\/\+LOGIN-\/\+ERROR} & Login denied by FTP server \\ \hline \end{DoxyExceptions} \mbox{\Hypertarget{class_qore_1_1_ftp_client_aff2f101e24bfe52cf2a974aad462086a}\label{class_qore_1_1_ftp_client_aff2f101e24bfe52cf2a974aad462086a}} \index{Qore::FtpClient@{Qore::FtpClient}!constructor@{constructor}} \index{constructor@{constructor}!Qore::FtpClient@{Qore::FtpClient}} \doxysubsubsection{\texorpdfstring{constructor()}{constructor()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}} {\footnotesize\ttfamily Qore\+::\+Ftp\+Client\+::constructor (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})} Creates an empty \mbox{\hyperlink{class_qore_1_1_ftp_client}{Ftp\+Client}} object. \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{FtpClient ftp();} \end{DoxyCode} \end{DoxyParagraph} \mbox{\Hypertarget{class_qore_1_1_ftp_client_a3cf48b0ab77ae7744476aa0f642dc363}\label{class_qore_1_1_ftp_client_a3cf48b0ab77ae7744476aa0f642dc363}} \index{Qore::FtpClient@{Qore::FtpClient}!constructor@{constructor}} \index{constructor@{constructor}!Qore::FtpClient@{Qore::FtpClient}} \doxysubsubsection{\texorpdfstring{constructor()}{constructor()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}} {\footnotesize\ttfamily Qore\+::\+Ftp\+Client\+::constructor (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{url }\end{DoxyParamCaption})} Creates an \mbox{\hyperlink{class_qore_1_1_ftp_client}{Ftp\+Client}} object and initializes it with a URL. It accepts one argument that will set the URL for the FTP connection; the path is ignored in the URL, however the username, password, hostname and port are respected; additionally if the protocol (or scheme) is {\ttfamily \char`\"{}ftps\char`\"{}}, the client will attempt to establish a secure connection to the server according to \href{http://tools.ietf.org/html/rfc4217}{\texttt{ RFC-\/4217}} when the first connection is established. \begin{DoxyParams}{Parameters} {\em url} & The URL of the server to connect to; must have at least a hostname\\ \hline \end{DoxyParams} \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{FtpClient ftp(\textcolor{stringliteral}{"{}ftp://user:pass@example.com:2021"{}});} \end{DoxyCode} \end{DoxyParagraph} \begin{DoxyExceptions}{Exceptions} {\em UNSUPPORTED-\/\+PROTOCOL} & Only {\ttfamily \char`\"{}ftp\char`\"{}} or {\ttfamily \char`\"{}ftps\char`\"{}} are allowed as the protocol in the URL \\ \hline {\em FTP-\/\+URL-\/\+ERROR} & No hostname given in the URL \\ \hline \end{DoxyExceptions} \mbox{\Hypertarget{class_qore_1_1_ftp_client_a5eb696dad8f1f62841533b5fefda127a}\label{class_qore_1_1_ftp_client_a5eb696dad8f1f62841533b5fefda127a}} \index{Qore::FtpClient@{Qore::FtpClient}!copy@{copy}} \index{copy@{copy}!Qore::FtpClient@{Qore::FtpClient}} \doxysubsubsection{\texorpdfstring{copy()}{copy()}} {\footnotesize\ttfamily Qore\+::\+Ftp\+Client\+::copy (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})} Throws an exception to prevent copying of objects this class. \begin{DoxyExceptions}{Exceptions} {\em FTPCLIENT-\/\+COPY-\/\+ERROR} & \mbox{\hyperlink{class_qore_1_1_ftp_client}{Ftp\+Client}} objects cannot be copied \\ \hline \end{DoxyExceptions} \mbox{\Hypertarget{class_qore_1_1_ftp_client_af98c09ee337da6b7651c6d02fb207ed0}\label{class_qore_1_1_ftp_client_af98c09ee337da6b7651c6d02fb207ed0}} \index{Qore::FtpClient@{Qore::FtpClient}!cwd@{cwd}} \index{cwd@{cwd}!Qore::FtpClient@{Qore::FtpClient}} \doxysubsubsection{\texorpdfstring{cwd()}{cwd()}} {\footnotesize\ttfamily nothing Qore\+::\+Ftp\+Client\+::cwd (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{path }\end{DoxyParamCaption})} Changes the current working directory on the server. \begin{DoxyParagraph}{Events\+:} \mbox{\hyperlink{event_handling_EVENT_FTP_SEND_MESSAGE}{EVENT\+\_\+\+FTP\+\_\+\+SEND\+\_\+\+MESSAGE}}, \mbox{\hyperlink{event_handling_EVENT_FTP_MESSAGE_RECEIVED}{EVENT\+\_\+\+FTP\+\_\+\+MESSAGE\+\_\+\+RECEIVED}}, \mbox{\hyperlink{event_handling_EVENT_PACKET_READ}{EVENT\+\_\+\+PACKET\+\_\+\+READ}}, \mbox{\hyperlink{event_handling_EVENT_PACKET_SENT}{EVENT\+\_\+\+PACKET\+\_\+\+SENT}} \end{DoxyParagraph} \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{ftp.cwd(\textcolor{stringliteral}{"{}/foo/bar"{}});} \end{DoxyCode} \end{DoxyParagraph} \begin{DoxyExceptions}{Exceptions} {\em FTP-\/\+RECEIVE-\/\+ERROR} & Incomplete message received on control port \\ \hline {\em FTP-\/\+CWD-\/\+ERROR} & FTP server returned an error to the CWD command\\ \hline \end{DoxyExceptions} \begin{DoxyNote}{Note} see \mbox{\hyperlink{class_qore_1_1_ftp_client_aef811b62489b3f15a600acb662494b83}{Ftp\+Client\+::connect()}} for additional exceptions that could be thrown when connections are implicitly established \end{DoxyNote} \mbox{\Hypertarget{class_qore_1_1_ftp_client_aaa29460512ce4c1630aef23ce645bee6}\label{class_qore_1_1_ftp_client_aaa29460512ce4c1630aef23ce645bee6}} \index{Qore::FtpClient@{Qore::FtpClient}!del@{del}} \index{del@{del}!Qore::FtpClient@{Qore::FtpClient}} \doxysubsubsection{\texorpdfstring{del()}{del()}} {\footnotesize\ttfamily nothing Qore\+::\+Ftp\+Client\+::del (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{remote\+\_\+path }\end{DoxyParamCaption})} Deletes a file from the FTP server; if any errors occur, an exception is thrown. \begin{DoxyParams}{Parameters} {\em remote\+\_\+path} & The path on the server to the file to delete\\ \hline \end{DoxyParams} \begin{DoxyParagraph}{Events\+:} \mbox{\hyperlink{event_handling_EVENT_FTP_SEND_MESSAGE}{EVENT\+\_\+\+FTP\+\_\+\+SEND\+\_\+\+MESSAGE}}, \mbox{\hyperlink{event_handling_EVENT_FTP_MESSAGE_RECEIVED}{EVENT\+\_\+\+FTP\+\_\+\+MESSAGE\+\_\+\+RECEIVED}}, \mbox{\hyperlink{event_handling_EVENT_PACKET_READ}{EVENT\+\_\+\+PACKET\+\_\+\+READ}}, \mbox{\hyperlink{event_handling_EVENT_PACKET_SENT}{EVENT\+\_\+\+PACKET\+\_\+\+SENT}} \end{DoxyParagraph} \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{ftp.del(\textcolor{stringliteral}{"{}file-\/2.txt"{}});} \end{DoxyCode} \end{DoxyParagraph} \begin{DoxyExceptions}{Exceptions} {\em FTP-\/\+RECEIVE-\/\+ERROR} & Incomplete message received on control port \\ \hline {\em FTP-\/\+DELETE-\/\+ERROR} & FTP server returned an error to the {\ttfamily DELE} command\\ \hline \end{DoxyExceptions} \begin{DoxyNote}{Note} see \mbox{\hyperlink{class_qore_1_1_ftp_client_aef811b62489b3f15a600acb662494b83}{Ftp\+Client\+::connect()}} for additional exceptions that could be thrown when connections are implicitly established \end{DoxyNote} \mbox{\Hypertarget{class_qore_1_1_ftp_client_aacbea70d0f883a92993b25f18ccf047d}\label{class_qore_1_1_ftp_client_aacbea70d0f883a92993b25f18ccf047d}} \index{Qore::FtpClient@{Qore::FtpClient}!destructor@{destructor}} \index{destructor@{destructor}!Qore::FtpClient@{Qore::FtpClient}} \doxysubsubsection{\texorpdfstring{destructor()}{destructor()}} {\footnotesize\ttfamily Qore\+::\+Ftp\+Client\+::destructor (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})} Disconnects any remote connection and destroys the object. \begin{DoxyParagraph}{Events\+:} \mbox{\hyperlink{event_handling_EVENT_CHANNEL_CLOSED}{EVENT\+\_\+\+CHANNEL\+\_\+\+CLOSED}}, \mbox{\hyperlink{event_handling_EVENT_DELETED}{EVENT\+\_\+\+DELETED}} \end{DoxyParagraph} \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{delete ftp;} \end{DoxyCode} \end{DoxyParagraph} \mbox{\Hypertarget{class_qore_1_1_ftp_client_a7b4cd4c149f4330651e5590b5beddc27}\label{class_qore_1_1_ftp_client_a7b4cd4c149f4330651e5590b5beddc27}} \index{Qore::FtpClient@{Qore::FtpClient}!disconnect@{disconnect}} \index{disconnect@{disconnect}!Qore::FtpClient@{Qore::FtpClient}} \doxysubsubsection{\texorpdfstring{disconnect()}{disconnect()}} {\footnotesize\ttfamily nothing Qore\+::\+Ftp\+Client\+::disconnect (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})} Disconnects from an FTP server. \begin{DoxyParagraph}{Events\+:} \mbox{\hyperlink{event_handling_EVENT_CHANNEL_CLOSED}{EVENT\+\_\+\+CHANNEL\+\_\+\+CLOSED}} \end{DoxyParagraph} \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{ftp.disconnect();} \end{DoxyCode} \end{DoxyParagraph} \mbox{\Hypertarget{class_qore_1_1_ftp_client_a2b06a66db173df6bac61b1af48c7a11c}\label{class_qore_1_1_ftp_client_a2b06a66db173df6bac61b1af48c7a11c}} \index{Qore::FtpClient@{Qore::FtpClient}!get@{get}} \index{get@{get}!Qore::FtpClient@{Qore::FtpClient}} \doxysubsubsection{\texorpdfstring{get()}{get()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}} {\footnotesize\ttfamily nothing Qore\+::\+Ftp\+Client\+::get (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{remote\+\_\+path, }\item[{\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{local\+\_\+path }\end{DoxyParamCaption})} Gets a file from the FTP server and stores it on the local filesystem; if any errors occur, an exception is thrown. \begin{DoxyParagraph}{Restrictions\+:} \mbox{\hyperlink{group__parse__options_ga5e466ed886222f0b57b0a399b455be71}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+FILESYSTEM}} \end{DoxyParagraph} \begin{DoxyParams}{Parameters} {\em remote\+\_\+path} & The path on the server to the file to get \\ \hline {\em local\+\_\+path} & The optional local path for saving the file; if this parameter is not given in the call, then the server path is used for the local path as well\\ \hline \end{DoxyParams} \begin{DoxyParagraph}{Events\+:} \mbox{\hyperlink{event_handling_EVENT_FTP_SEND_MESSAGE}{EVENT\+\_\+\+FTP\+\_\+\+SEND\+\_\+\+MESSAGE}}, \mbox{\hyperlink{event_handling_EVENT_FTP_MESSAGE_RECEIVED}{EVENT\+\_\+\+FTP\+\_\+\+MESSAGE\+\_\+\+RECEIVED}}, \mbox{\hyperlink{event_handling_EVENT_PACKET_READ}{EVENT\+\_\+\+PACKET\+\_\+\+READ}}, \mbox{\hyperlink{event_handling_EVENT_PACKET_SENT}{EVENT\+\_\+\+PACKET\+\_\+\+SENT}} \end{DoxyParagraph} \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{ftp.get(\textcolor{stringliteral}{"{}file.txt"{}}, \textcolor{stringliteral}{"{}/tmp/file-\/1.txt"{}});} \end{DoxyCode} \end{DoxyParagraph} \begin{DoxyExceptions}{Exceptions} {\em FTP-\/\+RECEIVE-\/\+ERROR} & Incomplete message received on control port \\ \hline {\em FTP-\/\+FILE-\/\+OPEN-\/\+ERROR} & Could not create the local file \\ \hline {\em FTP-\/\+GET-\/\+ERROR} & There was an error retrieving the file\\ \hline \end{DoxyExceptions} \begin{DoxyNote}{Note} \begin{DoxyItemize} \item see \mbox{\hyperlink{class_qore_1_1_ftp_client_aef811b62489b3f15a600acb662494b83}{Ftp\+Client\+::connect()}} for additional exceptions that could be thrown when connections are implicitly established \item any existing file with the same name is truncated before writing \end{DoxyItemize} \end{DoxyNote} \begin{DoxySeeAlso}{See also} \mbox{\hyperlink{class_qore_1_1_ftp_client_a61be0bf78d49b48578f1a800f1e95ae2}{Ftp\+Client\+::get\+As\+String()}}, Ftp\+Client\+::get\+As\+Data() \end{DoxySeeAlso} \mbox{\Hypertarget{class_qore_1_1_ftp_client_a9d3b68c1dd8f2cf65e30435f9fc3e2dc}\label{class_qore_1_1_ftp_client_a9d3b68c1dd8f2cf65e30435f9fc3e2dc}} \index{Qore::FtpClient@{Qore::FtpClient}!get@{get}} \index{get@{get}!Qore::FtpClient@{Qore::FtpClient}} \doxysubsubsection{\texorpdfstring{get()}{get()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}} {\footnotesize\ttfamily nothing Qore\+::\+Ftp\+Client\+::get (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{remote\+\_\+path, }\item[{\mbox{\hyperlink{class_qore_1_1_output_stream}{Qore\+::\+Output\+Stream}}}]{os }\end{DoxyParamCaption})} Gets a file from the FTP server and writes it to an \mbox{\hyperlink{class_qore_1_1_output_stream}{Output\+Stream}}; if any errors occur, an exception is thrown. \begin{DoxyParams}{Parameters} {\em remote\+\_\+path} & The path on the server to the file to get \\ \hline {\em os} & The output stream to write the file to\\ \hline \end{DoxyParams} \begin{DoxyParagraph}{Events\+:} \mbox{\hyperlink{event_handling_EVENT_FTP_SEND_MESSAGE}{EVENT\+\_\+\+FTP\+\_\+\+SEND\+\_\+\+MESSAGE}}, \mbox{\hyperlink{event_handling_EVENT_FTP_MESSAGE_RECEIVED}{EVENT\+\_\+\+FTP\+\_\+\+MESSAGE\+\_\+\+RECEIVED}}, \mbox{\hyperlink{event_handling_EVENT_PACKET_READ}{EVENT\+\_\+\+PACKET\+\_\+\+READ}}, \mbox{\hyperlink{event_handling_EVENT_PACKET_SENT}{EVENT\+\_\+\+PACKET\+\_\+\+SENT}} \end{DoxyParagraph} \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{ftp.get(\textcolor{stringliteral}{"{}file.txt"{}}, new FileOutputStream(\textcolor{stringliteral}{"{}/tmp/file-\/1.txt"{}}));} \end{DoxyCode} \end{DoxyParagraph} \begin{DoxyExceptions}{Exceptions} {\em FTP-\/\+RECEIVE-\/\+ERROR} & Incomplete message received on control port \\ \hline {\em FTP-\/\+FILE-\/\+OPEN-\/\+ERROR} & Could not create the local file \\ \hline {\em FTP-\/\+GET-\/\+ERROR} & There was an error retrieving the file\\ \hline \end{DoxyExceptions} \begin{DoxyNote}{Note} see \mbox{\hyperlink{class_qore_1_1_ftp_client_aef811b62489b3f15a600acb662494b83}{Ftp\+Client\+::connect()}} for additional exceptions that could be thrown when connections are implicitly established \end{DoxyNote} \begin{DoxySeeAlso}{See also} \mbox{\hyperlink{class_qore_1_1_ftp_client_a61be0bf78d49b48578f1a800f1e95ae2}{Ftp\+Client\+::get\+As\+String()}}, Ftp\+Client\+::get\+As\+Data() \end{DoxySeeAlso} \begin{DoxySince}{Since} Qore 0.\+8.\+13 \end{DoxySince} \mbox{\Hypertarget{class_qore_1_1_ftp_client_a6884aa57e8750c09e029fb919a31b6dd}\label{class_qore_1_1_ftp_client_a6884aa57e8750c09e029fb919a31b6dd}} \index{Qore::FtpClient@{Qore::FtpClient}!getAsBinary@{getAsBinary}} \index{getAsBinary@{getAsBinary}!Qore::FtpClient@{Qore::FtpClient}} \doxysubsubsection{\texorpdfstring{getAsBinary()}{getAsBinary()}} {\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}} Qore\+::\+Ftp\+Client\+::get\+As\+Binary (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{remote\+\_\+path }\end{DoxyParamCaption})} Gets a file from the FTP server and returns it as a binary. \begin{DoxyParams}{Parameters} {\em remote\+\_\+path} & The path on the server to the file to get\\ \hline \end{DoxyParams} \begin{DoxyReturn}{Returns} The file data retrieved; if any errors occur an exception is raised \end{DoxyReturn} \begin{DoxyParagraph}{Events\+:} \mbox{\hyperlink{event_handling_EVENT_FTP_SEND_MESSAGE}{EVENT\+\_\+\+FTP\+\_\+\+SEND\+\_\+\+MESSAGE}}, \mbox{\hyperlink{event_handling_EVENT_FTP_MESSAGE_RECEIVED}{EVENT\+\_\+\+FTP\+\_\+\+MESSAGE\+\_\+\+RECEIVED}}, \mbox{\hyperlink{event_handling_EVENT_PACKET_READ}{EVENT\+\_\+\+PACKET\+\_\+\+READ}}, \mbox{\hyperlink{event_handling_EVENT_PACKET_SENT}{EVENT\+\_\+\+PACKET\+\_\+\+SENT}} \end{DoxyParagraph} \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{binary b = ftp.getAsBinary(\textcolor{stringliteral}{"{}file.pdf"{}});} \end{DoxyCode} \end{DoxyParagraph} \begin{DoxyExceptions}{Exceptions} {\em FTP-\/\+RECEIVE-\/\+ERROR} & Incomplete message received on control port \\ \hline {\em FTP-\/\+FILE-\/\+OPEN-\/\+ERROR} & Could not create the local file \\ \hline {\em FTP-\/\+GET-\/\+ERROR} & There was an error retrieving the file\\ \hline \end{DoxyExceptions} \begin{DoxyNote}{Note} see \mbox{\hyperlink{class_qore_1_1_ftp_client_aef811b62489b3f15a600acb662494b83}{Ftp\+Client\+::connect()}} for additional exceptions that could be thrown when connections are implicitly established \end{DoxyNote} \begin{DoxySeeAlso}{See also} \mbox{\hyperlink{class_qore_1_1_ftp_client_a61be0bf78d49b48578f1a800f1e95ae2}{Ftp\+Client\+::get\+As\+String()}} for a similar function returning the file\textquotesingle{}s contents as a \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}; see \mbox{\hyperlink{class_qore_1_1_ftp_client_a2b06a66db173df6bac61b1af48c7a11c}{Ftp\+Client\+::get()}} for a function that will \mbox{\hyperlink{class_qore_1_1_ftp_client_a2b06a66db173df6bac61b1af48c7a11c}{get}} a remote file and save it on the local filesystem \end{DoxySeeAlso} \mbox{\Hypertarget{class_qore_1_1_ftp_client_a61be0bf78d49b48578f1a800f1e95ae2}\label{class_qore_1_1_ftp_client_a61be0bf78d49b48578f1a800f1e95ae2}} \index{Qore::FtpClient@{Qore::FtpClient}!getAsString@{getAsString}} \index{getAsString@{getAsString}!Qore::FtpClient@{Qore::FtpClient}} \doxysubsubsection{\texorpdfstring{getAsString()}{getAsString()}} {\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::\+Ftp\+Client\+::get\+As\+String (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{remote\+\_\+path, }\item[{\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{encoding }\end{DoxyParamCaption})} Gets a file from the FTP server and returns it as a string. \begin{DoxyParams}{Parameters} {\em remote\+\_\+path} & The path on the server to the file to get \\ \hline {\em encoding} & the output encoding for the string; if not given, then the default encoding is used ({\ttfamily UTF-\/8})\\ \hline \end{DoxyParams} \begin{DoxyReturn}{Returns} The file retrieved as a string; if any errors occur an exception is raised \end{DoxyReturn} \begin{DoxyParagraph}{Events\+:} \mbox{\hyperlink{event_handling_EVENT_FTP_SEND_MESSAGE}{EVENT\+\_\+\+FTP\+\_\+\+SEND\+\_\+\+MESSAGE}}, \mbox{\hyperlink{event_handling_EVENT_FTP_MESSAGE_RECEIVED}{EVENT\+\_\+\+FTP\+\_\+\+MESSAGE\+\_\+\+RECEIVED}}, \mbox{\hyperlink{event_handling_EVENT_PACKET_READ}{EVENT\+\_\+\+PACKET\+\_\+\+READ}}, \mbox{\hyperlink{event_handling_EVENT_PACKET_SENT}{EVENT\+\_\+\+PACKET\+\_\+\+SENT}} \end{DoxyParagraph} \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{string str = ftp.getAsString(\textcolor{stringliteral}{"{}file.txt"{}});} \end{DoxyCode} \end{DoxyParagraph} \begin{DoxyExceptions}{Exceptions} {\em FTP-\/\+RECEIVE-\/\+ERROR} & Incomplete message received on control port \\ \hline {\em FTP-\/\+FILE-\/\+OPEN-\/\+ERROR} & Could not create the local file \\ \hline {\em FTP-\/\+GET-\/\+ERROR} & There was an error retrieving the file\\ \hline \end{DoxyExceptions} \begin{DoxyNote}{Note} see \mbox{\hyperlink{class_qore_1_1_ftp_client_aef811b62489b3f15a600acb662494b83}{Ftp\+Client\+::connect()}} for additional exceptions that could be thrown when connections are implicitly established \end{DoxyNote} \begin{DoxySeeAlso}{See also} \mbox{\hyperlink{class_qore_1_1_ftp_client_a6884aa57e8750c09e029fb919a31b6dd}{Ftp\+Client\+::get\+As\+Binary()}} for a similar function returning the file\textquotesingle{}s contents as a \mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}}; see \mbox{\hyperlink{class_qore_1_1_ftp_client_a2b06a66db173df6bac61b1af48c7a11c}{Ftp\+Client\+::get()}} for a function that will \mbox{\hyperlink{class_qore_1_1_ftp_client_a2b06a66db173df6bac61b1af48c7a11c}{get}} a remote file and save it on the local filesystem \end{DoxySeeAlso} \begin{DoxySince}{Since} Qore 1.\+3 added the {\itshape encoding} parameter \end{DoxySince} \mbox{\Hypertarget{class_qore_1_1_ftp_client_ab07b745d71fb0d9be7860fd41c9450c8}\label{class_qore_1_1_ftp_client_ab07b745d71fb0d9be7860fd41c9450c8}} \index{Qore::FtpClient@{Qore::FtpClient}!getControlPeerInfo@{getControlPeerInfo}} \index{getControlPeerInfo@{getControlPeerInfo}!Qore::FtpClient@{Qore::FtpClient}} \doxysubsubsection{\texorpdfstring{getControlPeerInfo()}{getControlPeerInfo()}} {\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga0231dbb472dd230310af7c7c34f56e92}{hash}}$<$auto$>$ Qore\+::\+Ftp\+Client\+::get\+Control\+Peer\+Info (\begin{DoxyParamCaption}\item[{bool}]{host\+\_\+lookup = {\ttfamily \mbox{\hyperlink{group__boolean__constants_ga3ba2df91713a6249449347131ea526c3}{True}}} }\end{DoxyParamCaption})} Returns information about the remote end of the control socket as a hash. If the control socket is not open, an exception is thrown \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{hash h = ftp.getControlPeerInfo();} \end{DoxyCode} \end{DoxyParagraph} \begin{DoxyParams}{Parameters} {\em host\+\_\+lookup} & do a lookup of the hostname; if this is \mbox{\hyperlink{basic_data_types_False}{False}} then {\ttfamily \char`\"{}hostname\char`\"{}} and {\ttfamily \char`\"{}hostname\+\_\+desc\char`\"{}} are not present in the response hash\\ \hline \end{DoxyParams} \begin{DoxyReturn}{Returns} a \mbox{\hyperlink{class_qore_1_1_socket_socket_info_hash}{hash of information}} about the remote end for connected sockets \end{DoxyReturn} \begin{DoxyExceptions}{Exceptions} {\em SOCKET-\/\+NOT-\/\+OPEN} & The socket is not open \\ \hline {\em SOCKET-\/\+GETPEERINFO-\/\+ERROR} & error in getpeername()\\ \hline \end{DoxyExceptions} \begin{DoxySince}{Since} Qore 0.\+9.\+0 \end{DoxySince} \mbox{\Hypertarget{class_qore_1_1_ftp_client_aa9bd9f5c986f891fa1e2021d426c0969}\label{class_qore_1_1_ftp_client_aa9bd9f5c986f891fa1e2021d426c0969}} \index{Qore::FtpClient@{Qore::FtpClient}!getControlSocketInfo@{getControlSocketInfo}} \index{getControlSocketInfo@{getControlSocketInfo}!Qore::FtpClient@{Qore::FtpClient}} \doxysubsubsection{\texorpdfstring{getControlSocketInfo()}{getControlSocketInfo()}} {\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga0231dbb472dd230310af7c7c34f56e92}{hash}}$<$auto$>$ Qore\+::\+Ftp\+Client\+::get\+Control\+Socket\+Info (\begin{DoxyParamCaption}\item[{bool}]{host\+\_\+lookup = {\ttfamily \mbox{\hyperlink{group__boolean__constants_ga3ba2df91713a6249449347131ea526c3}{True}}} }\end{DoxyParamCaption})} Returns information about the local control socket as a hash. If the control socket is not open, an exception is thrown \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{hash h = ftp.getControlSocketInfo();} \end{DoxyCode} \end{DoxyParagraph} \begin{DoxyParams}{Parameters} {\em host\+\_\+lookup} & do a lookup of the hostname; if this is \mbox{\hyperlink{basic_data_types_False}{False}} then {\ttfamily \char`\"{}hostname\char`\"{}} and {\ttfamily \char`\"{}hostname\+\_\+desc\char`\"{}} are not present in the response hash\\ \hline \end{DoxyParams} \begin{DoxyReturn}{Returns} a \mbox{\hyperlink{class_qore_1_1_socket_socket_info_hash}{hash of information}} about the remote end for connected sockets \end{DoxyReturn} \begin{DoxyExceptions}{Exceptions} {\em SOCKET-\/\+NOT-\/\+OPEN} & The socket is not open \\ \hline {\em SOCKET-\/\+GETSOCKETINFO-\/\+ERROR} & error in getsockname()\\ \hline \end{DoxyExceptions} \begin{DoxySince}{Since} Qore 0.\+9.\+0 \end{DoxySince} \mbox{\Hypertarget{class_qore_1_1_ftp_client_a4655d94c5f3a25d14098b65c21755d31}\label{class_qore_1_1_ftp_client_a4655d94c5f3a25d14098b65c21755d31}} \index{Qore::FtpClient@{Qore::FtpClient}!getDataPeerInfo@{getDataPeerInfo}} \index{getDataPeerInfo@{getDataPeerInfo}!Qore::FtpClient@{Qore::FtpClient}} \doxysubsubsection{\texorpdfstring{getDataPeerInfo()}{getDataPeerInfo()}} {\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga0231dbb472dd230310af7c7c34f56e92}{hash}}$<$auto$>$ Qore\+::\+Ftp\+Client\+::get\+Data\+Peer\+Info (\begin{DoxyParamCaption}\item[{bool}]{host\+\_\+lookup = {\ttfamily \mbox{\hyperlink{group__boolean__constants_ga3ba2df91713a6249449347131ea526c3}{True}}} }\end{DoxyParamCaption})} Returns information about the remote data socket as a hash. If the data socket is not open, an exception is thrown \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{hash h = ftp.getDataPeerInfo();} \end{DoxyCode} \end{DoxyParagraph} \begin{DoxyParams}{Parameters} {\em host\+\_\+lookup} & do a lookup of the hostname; if this is \mbox{\hyperlink{basic_data_types_False}{False}} then {\ttfamily \char`\"{}hostname\char`\"{}} and {\ttfamily \char`\"{}hostname\+\_\+desc\char`\"{}} are not present in the response hash\\ \hline \end{DoxyParams} \begin{DoxyReturn}{Returns} a \mbox{\hyperlink{class_qore_1_1_socket_socket_info_hash}{hash of information}} about the remote end for connected sockets \end{DoxyReturn} \begin{DoxyExceptions}{Exceptions} {\em SOCKET-\/\+NOT-\/\+OPEN} & The socket is not open \\ \hline {\em SOCKET-\/\+GETPEERINFO-\/\+ERROR} & error in getpeername()\\ \hline \end{DoxyExceptions} \begin{DoxySince}{Since} Qore 0.\+9.\+0 \end{DoxySince} \mbox{\Hypertarget{class_qore_1_1_ftp_client_a9c91cf56b957986b28ae36db98466d0b}\label{class_qore_1_1_ftp_client_a9c91cf56b957986b28ae36db98466d0b}} \index{Qore::FtpClient@{Qore::FtpClient}!getDataSocketInfo@{getDataSocketInfo}} \index{getDataSocketInfo@{getDataSocketInfo}!Qore::FtpClient@{Qore::FtpClient}} \doxysubsubsection{\texorpdfstring{getDataSocketInfo()}{getDataSocketInfo()}} {\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga0231dbb472dd230310af7c7c34f56e92}{hash}}$<$auto$>$ Qore\+::\+Ftp\+Client\+::get\+Data\+Socket\+Info (\begin{DoxyParamCaption}\item[{bool}]{host\+\_\+lookup = {\ttfamily \mbox{\hyperlink{group__boolean__constants_ga3ba2df91713a6249449347131ea526c3}{True}}} }\end{DoxyParamCaption})} Returns information about the local data socket as a hash. If the data socket is not open, an exception is thrown \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{hash h = ftp.getControlSocketInfo();} \end{DoxyCode} \end{DoxyParagraph} \begin{DoxyParams}{Parameters} {\em host\+\_\+lookup} & do a lookup of the hostname; if this is \mbox{\hyperlink{basic_data_types_False}{False}} then {\ttfamily \char`\"{}hostname\char`\"{}} and {\ttfamily \char`\"{}hostname\+\_\+desc\char`\"{}} are not present in the response hash\\ \hline \end{DoxyParams} \begin{DoxyReturn}{Returns} a \mbox{\hyperlink{class_qore_1_1_socket_socket_info_hash}{hash of information}} about the remote end for connected sockets \end{DoxyReturn} \begin{DoxyExceptions}{Exceptions} {\em SOCKET-\/\+NOT-\/\+OPEN} & The socket is not open \\ \hline {\em SOCKET-\/\+GETSOCKETINFO-\/\+ERROR} & error in getsockname()\\ \hline \end{DoxyExceptions} \begin{DoxySince}{Since} Qore 0.\+9.\+0 \end{DoxySince} \mbox{\Hypertarget{class_qore_1_1_ftp_client_af7aca96e8290a8c086659b10ee5aa410}\label{class_qore_1_1_ftp_client_af7aca96e8290a8c086659b10ee5aa410}} \index{Qore::FtpClient@{Qore::FtpClient}!getHostName@{getHostName}} \index{getHostName@{getHostName}!Qore::FtpClient@{Qore::FtpClient}} \doxysubsubsection{\texorpdfstring{getHostName()}{getHostName()}} {\footnotesize\ttfamily \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::\+Ftp\+Client\+::get\+Host\+Name (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})} Returns the current hostname value or \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} if none is set. \begin{DoxyReturn}{Returns} the current hostname value that will be used for the next connection or \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} if none is set \end{DoxyReturn} \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{*string host = ftp.getHostName();} \end{DoxyCode} \end{DoxyParagraph} \mbox{\Hypertarget{class_qore_1_1_ftp_client_abe7fe74d0bf2ea11fdedc5f0c67af5dc}\label{class_qore_1_1_ftp_client_abe7fe74d0bf2ea11fdedc5f0c67af5dc}} \index{Qore::FtpClient@{Qore::FtpClient}!getMode@{getMode}} \index{getMode@{getMode}!Qore::FtpClient@{Qore::FtpClient}} \doxysubsubsection{\texorpdfstring{getMode()}{getMode()}} {\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::\+Ftp\+Client\+::get\+Mode (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})} returns a string for the connection mode\+: {\ttfamily \char`\"{}port\char`\"{}}, {\ttfamily \char`\"{}pasv\char`\"{}}, {\ttfamily \char`\"{}epsv\char`\"{}}, or {\ttfamily \char`\"{}auto\char`\"{}} if not connected and auto mode is set \begin{DoxyParagraph}{Code Flags\+:} \mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}} \end{DoxyParagraph} \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{string mode = ftp.getMode();} \end{DoxyCode} \end{DoxyParagraph} \begin{DoxySince}{Since} Qore 0.\+8.\+12 \end{DoxySince} \mbox{\Hypertarget{class_qore_1_1_ftp_client_a288bbef821ce9641b0175a2052680001}\label{class_qore_1_1_ftp_client_a288bbef821ce9641b0175a2052680001}} \index{Qore::FtpClient@{Qore::FtpClient}!getNetworkFamily@{getNetworkFamily}} \index{getNetworkFamily@{getNetworkFamily}!Qore::FtpClient@{Qore::FtpClient}} \doxysubsubsection{\texorpdfstring{getNetworkFamily()}{getNetworkFamily()}} {\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::\+Ftp\+Client\+::get\+Network\+Family (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})} Returns the network address family to use for new connections. \begin{DoxyReturn}{Returns} the network address family to use for new connections; see \mbox{\hyperlink{group__network__address__family__constants}{Network Address Family Constants}} for valid values; \mbox{\hyperlink{group__network__address__family__constants_gac4f81abe9d374562b41117c51950fb80}{Qore\+::\+AF\+\_\+\+UNSPEC}} means to automatically choose the family (the default) \end{DoxyReturn} \begin{DoxyParagraph}{Code Flags\+:} \mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}} \end{DoxyParagraph} \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{int family = ftp.getNetworkFamily();} \end{DoxyCode} \end{DoxyParagraph} \begin{DoxySince}{Since} Qore 0.\+9.\+0 \end{DoxySince} \mbox{\Hypertarget{class_qore_1_1_ftp_client_ae1c299c9e3d8b5cc965d1fd61d588823}\label{class_qore_1_1_ftp_client_ae1c299c9e3d8b5cc965d1fd61d588823}} \index{Qore::FtpClient@{Qore::FtpClient}!getPassword@{getPassword}} \index{getPassword@{getPassword}!Qore::FtpClient@{Qore::FtpClient}} \doxysubsubsection{\texorpdfstring{getPassword()}{getPassword()}} {\footnotesize\ttfamily \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::\+Ftp\+Client\+::get\+Password (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})} Returns the current password value or \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} if none is set. \begin{DoxyReturn}{Returns} the current password value that will be used for the next connection or \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} if none is set \end{DoxyReturn} \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{*string \textcolor{keywordflow}{pass} = ftp.getPassword();} \end{DoxyCode} \end{DoxyParagraph} \mbox{\Hypertarget{class_qore_1_1_ftp_client_a73e0baafad3d0b0e38d659b31fbb1423}\label{class_qore_1_1_ftp_client_a73e0baafad3d0b0e38d659b31fbb1423}} \index{Qore::FtpClient@{Qore::FtpClient}!getPort@{getPort}} \index{getPort@{getPort}!Qore::FtpClient@{Qore::FtpClient}} \doxysubsubsection{\texorpdfstring{getPort()}{getPort()}} {\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::\+Ftp\+Client\+::get\+Port (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})} Retrieves the current connection port value for this object. \begin{DoxyReturn}{Returns} the current port value that will be used for the next connection \end{DoxyReturn} \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{int port = ftp.getPort();} \end{DoxyCode} \end{DoxyParagraph} \mbox{\Hypertarget{class_qore_1_1_ftp_client_adb91e4ad74569ef20a4b53e507bf0ad9}\label{class_qore_1_1_ftp_client_adb91e4ad74569ef20a4b53e507bf0ad9}} \index{Qore::FtpClient@{Qore::FtpClient}!getSSLCipherName@{getSSLCipherName}} \index{getSSLCipherName@{getSSLCipherName}!Qore::FtpClient@{Qore::FtpClient}} \doxysubsubsection{\texorpdfstring{getSSLCipherName()}{getSSLCipherName()}} {\footnotesize\ttfamily \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::\+Ftp\+Client\+::get\+SSLCipher\+Name (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})} Returns the name of the cipher for an encrypted connection or \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} if an encrypted connection is not established. \begin{DoxyReturn}{Returns} the name of the cipher for an encrypted connection or \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} if an encrypted connection is not established \end{DoxyReturn} \begin{DoxyParagraph}{Code Flags\+:} \mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}} \end{DoxyParagraph} \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{\textcolor{keywordflow}{if} (ftp.isSecure())} \DoxyCodeLine{ \mbox{\hyperlink{group__string__functions_ga32070517a9f8a70a32ef48f83a6f128e}{printf}}(\textcolor{stringliteral}{"{}secure connection: \%s \%s\(\backslash\)n"{}}, ftp.getSSLCipherName(), ftp.getSSLCipherVersion());} \end{DoxyCode} \end{DoxyParagraph} \mbox{\Hypertarget{class_qore_1_1_ftp_client_a44b230cef51f054d0bc89a7ebb237b4b}\label{class_qore_1_1_ftp_client_a44b230cef51f054d0bc89a7ebb237b4b}} \index{Qore::FtpClient@{Qore::FtpClient}!getSSLCipherVersion@{getSSLCipherVersion}} \index{getSSLCipherVersion@{getSSLCipherVersion}!Qore::FtpClient@{Qore::FtpClient}} \doxysubsubsection{\texorpdfstring{getSSLCipherVersion()}{getSSLCipherVersion()}} {\footnotesize\ttfamily \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::\+Ftp\+Client\+::get\+SSLCipher\+Version (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})} Returns the version of the cipher for an encrypted connection or \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} if an encrypted connection is not established. \begin{DoxyReturn}{Returns} the version of the cipher for an encrypted connection or \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} if an encrypted connection is not established \end{DoxyReturn} \begin{DoxyParagraph}{Code Flags\+:} \mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}} \end{DoxyParagraph} \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{\textcolor{keywordflow}{if} (ftp.isSecure())} \DoxyCodeLine{ \mbox{\hyperlink{group__string__functions_ga32070517a9f8a70a32ef48f83a6f128e}{printf}}(\textcolor{stringliteral}{"{}secure connection: \%s \%s\(\backslash\)n"{}}, ftp.getSSLCipherName(), ftp.getSSLCipherVersion());} \end{DoxyCode} \end{DoxyParagraph} \mbox{\Hypertarget{class_qore_1_1_ftp_client_ac53196ba6703b4dab58cd33cd007bf32}\label{class_qore_1_1_ftp_client_ac53196ba6703b4dab58cd33cd007bf32}} \index{Qore::FtpClient@{Qore::FtpClient}!getTimeout@{getTimeout}} \index{getTimeout@{getTimeout}!Qore::FtpClient@{Qore::FtpClient}} \doxysubsubsection{\texorpdfstring{getTimeout()}{getTimeout()}} {\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::\+Ftp\+Client\+::get\+Timeout (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})} returns the socket I/O timeout value as an integer in milliseconds \begin{DoxyParagraph}{Code Flags\+:} \mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}} \end{DoxyParagraph} \begin{DoxyReturn}{Returns} the socket timeout value in milliseconds \end{DoxyReturn} \begin{DoxySince}{Since} Qore 0.\+8.\+12.\+3 \end{DoxySince} \mbox{\Hypertarget{class_qore_1_1_ftp_client_a3becc28023f121a7aa3c40a4c396a602}\label{class_qore_1_1_ftp_client_a3becc28023f121a7aa3c40a4c396a602}} \index{Qore::FtpClient@{Qore::FtpClient}!getURL@{getURL}} \index{getURL@{getURL}!Qore::FtpClient@{Qore::FtpClient}} \doxysubsubsection{\texorpdfstring{getURL()}{getURL()}} {\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::\+Ftp\+Client\+::get\+URL (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})} Retrieves the current connection URL string for this object. \begin{DoxyReturn}{Returns} the current connection URL string for this object \end{DoxyReturn} \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{string url = ftp.getURL();} \end{DoxyCode} \end{DoxyParagraph} \mbox{\Hypertarget{class_qore_1_1_ftp_client_a8734c1ff4459851cbc320443d3b921e6}\label{class_qore_1_1_ftp_client_a8734c1ff4459851cbc320443d3b921e6}} \index{Qore::FtpClient@{Qore::FtpClient}!getUsageInfo@{getUsageInfo}} \index{getUsageInfo@{getUsageInfo}!Qore::FtpClient@{Qore::FtpClient}} \doxysubsubsection{\texorpdfstring{getUsageInfo()}{getUsageInfo()}} {\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga0231dbb472dd230310af7c7c34f56e92}{hash}} Qore\+::\+Ftp\+Client\+::get\+Usage\+Info (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})} Returns performance statistics for the socket. \begin{DoxyParagraph}{Code Flags\+:} \mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}} \end{DoxyParagraph} \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{hash h = ftp.getUsageInfo();} \end{DoxyCode} \end{DoxyParagraph} \begin{DoxyReturn}{Returns} a hash with the following keys\+: \begin{DoxyItemize} \item {\ttfamily \char`\"{}bytes\+\_\+sent\char`\"{}}\+: an integer giving the total amount of bytes sent \item {\ttfamily \char`\"{}bytes\+\_\+recv\char`\"{}}\+: an integer giving the total amount of bytes received \item {\ttfamily \char`\"{}us\+\_\+sent\char`\"{}}\+: an integer giving the total number of microseconds spent sending data \item {\ttfamily \char`\"{}us\+\_\+recv\char`\"{}}\+: an integer giving the total number of microseconds spent receiving data \item {\ttfamily \char`\"{}arg\char`\"{}}\+: (only if warning values have been set with \mbox{\hyperlink{class_qore_1_1_ftp_client_a49a2e47cde50ae8bbcbca8721199dd16}{Ftp\+Client\+::set\+Warning\+Queue()}}) the optional argument for warning hashes \item {\ttfamily \char`\"{}timeout\char`\"{}}\+: (only if warning values have been set with \mbox{\hyperlink{class_qore_1_1_ftp_client_a49a2e47cde50ae8bbcbca8721199dd16}{Ftp\+Client\+::set\+Warning\+Queue()}}) the warning timeout in microseconds \item {\ttfamily \char`\"{}min\+\_\+throughput\char`\"{}}\+: (only if warning values have been set with \mbox{\hyperlink{class_qore_1_1_ftp_client_a49a2e47cde50ae8bbcbca8721199dd16}{Ftp\+Client\+::set\+Warning\+Queue()}}) the minimum warning throughput in bytes/sec \end{DoxyItemize} \end{DoxyReturn} \begin{DoxySince}{Since} Qore 0.\+8.\+9 \end{DoxySince} \begin{DoxySeeAlso}{See also} \mbox{\hyperlink{class_qore_1_1_ftp_client_a1732a34fe1f8349fc05ef113b3c5af08}{Ftp\+Client\+::clear\+Stats()}} \end{DoxySeeAlso} \mbox{\Hypertarget{class_qore_1_1_ftp_client_a4ae45142fe54a12f9548154b8f8e2c1e}\label{class_qore_1_1_ftp_client_a4ae45142fe54a12f9548154b8f8e2c1e}} \index{Qore::FtpClient@{Qore::FtpClient}!getUserName@{getUserName}} \index{getUserName@{getUserName}!Qore::FtpClient@{Qore::FtpClient}} \doxysubsubsection{\texorpdfstring{getUserName()}{getUserName()}} {\footnotesize\ttfamily \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::\+Ftp\+Client\+::get\+User\+Name (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})} Returns the current username value or \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} if none is set. \begin{DoxyReturn}{Returns} the current username value that will be used for the next connection or \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} if none is set \end{DoxyReturn} \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{*string user = ftp.getUserName();} \end{DoxyCode} \end{DoxyParagraph} \mbox{\Hypertarget{class_qore_1_1_ftp_client_a3025f2ac95d03d4e744de82b5a26ad9a}\label{class_qore_1_1_ftp_client_a3025f2ac95d03d4e744de82b5a26ad9a}} \index{Qore::FtpClient@{Qore::FtpClient}!isDataSecure@{isDataSecure}} \index{isDataSecure@{isDataSecure}!Qore::FtpClient@{Qore::FtpClient}} \doxysubsubsection{\texorpdfstring{isDataSecure()}{isDataSecure()}} {\footnotesize\ttfamily bool Qore\+::\+Ftp\+Client\+::is\+Data\+Secure (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})} Returns \mbox{\hyperlink{basic_data_types_True}{True}} if the data connections are secure TLS/\+SSL connections, \mbox{\hyperlink{basic_data_types_False}{False}} if not. \begin{DoxyReturn}{Returns} \mbox{\hyperlink{basic_data_types_True}{True}} if the data connections are secure TLS/\+SSL connections, \mbox{\hyperlink{basic_data_types_False}{False}} if not \end{DoxyReturn} \begin{DoxyParagraph}{Code Flags\+:} \mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}} \end{DoxyParagraph} \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{bool b = ftp.isDataSecure();} \end{DoxyCode} \end{DoxyParagraph} \mbox{\Hypertarget{class_qore_1_1_ftp_client_ad6b30ff57e39fc5aa580d20b135195d9}\label{class_qore_1_1_ftp_client_ad6b30ff57e39fc5aa580d20b135195d9}} \index{Qore::FtpClient@{Qore::FtpClient}!isSecure@{isSecure}} \index{isSecure@{isSecure}!Qore::FtpClient@{Qore::FtpClient}} \doxysubsubsection{\texorpdfstring{isSecure()}{isSecure()}} {\footnotesize\ttfamily bool Qore\+::\+Ftp\+Client\+::is\+Secure (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})} Returns \mbox{\hyperlink{basic_data_types_True}{True}} if the control connection is a secure TLS/\+SSL connection, \mbox{\hyperlink{basic_data_types_False}{False}} if not. \begin{DoxyReturn}{Returns} \mbox{\hyperlink{basic_data_types_True}{True}} if the control connection is a secure TLS/\+SSL connection, \mbox{\hyperlink{basic_data_types_False}{False}} if not \end{DoxyReturn} \begin{DoxyParagraph}{Code Flags\+:} \mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}} \end{DoxyParagraph} \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{bool b = ftp.isSecure();} \end{DoxyCode} \end{DoxyParagraph} \mbox{\Hypertarget{class_qore_1_1_ftp_client_a21409b36294103779bba4f872e6ff8aa}\label{class_qore_1_1_ftp_client_a21409b36294103779bba4f872e6ff8aa}} \index{Qore::FtpClient@{Qore::FtpClient}!list@{list}} \index{list@{list}!Qore::FtpClient@{Qore::FtpClient}} \doxysubsubsection{\texorpdfstring{list()}{list()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}} {\footnotesize\ttfamily \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::\+Ftp\+Client\+::list (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})} Returns a list of files from the FTP server in the server\textquotesingle{}s long format in the current working directory or \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} if the path cannot be found. \begin{DoxyParagraph}{Events\+:} \mbox{\hyperlink{event_handling_EVENT_FTP_SEND_MESSAGE}{EVENT\+\_\+\+FTP\+\_\+\+SEND\+\_\+\+MESSAGE}}, \mbox{\hyperlink{event_handling_EVENT_FTP_MESSAGE_RECEIVED}{EVENT\+\_\+\+FTP\+\_\+\+MESSAGE\+\_\+\+RECEIVED}}, \mbox{\hyperlink{event_handling_EVENT_PACKET_READ}{EVENT\+\_\+\+PACKET\+\_\+\+READ}}, \mbox{\hyperlink{event_handling_EVENT_PACKET_SENT}{EVENT\+\_\+\+PACKET\+\_\+\+SENT}} \end{DoxyParagraph} \begin{DoxyReturn}{Returns} a list of files from the FTP server in the server\textquotesingle{}s long format in the current working directory or \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} if the path cannot be found \end{DoxyReturn} \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{*string str = ftp.list();} \end{DoxyCode} \end{DoxyParagraph} \begin{DoxyExceptions}{Exceptions} {\em FTP-\/\+RECEIVE-\/\+ERROR} & Incomplete message received on control port \\ \hline {\em FTP-\/\+LIST-\/\+ERROR} & FTP server returned an error in response to the LIST command\\ \hline \end{DoxyExceptions} \begin{DoxyNote}{Note} see \mbox{\hyperlink{class_qore_1_1_ftp_client_aef811b62489b3f15a600acb662494b83}{Ftp\+Client\+::connect()}} for additional exceptions that could be thrown when connections are implicitly established \end{DoxyNote} \begin{DoxySeeAlso}{See also} \mbox{\hyperlink{class_qore_1_1_ftp_client_aa4905e4a78ade8053e709f094a7ed705}{Ftp\+Client\+::nlst()}} \end{DoxySeeAlso} \mbox{\Hypertarget{class_qore_1_1_ftp_client_ad987cf2d506bb966f7886425abd8d23c}\label{class_qore_1_1_ftp_client_ad987cf2d506bb966f7886425abd8d23c}} \index{Qore::FtpClient@{Qore::FtpClient}!list@{list}} \index{list@{list}!Qore::FtpClient@{Qore::FtpClient}} \doxysubsubsection{\texorpdfstring{list()}{list()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}} {\footnotesize\ttfamily \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::\+Ftp\+Client\+::list (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{path }\end{DoxyParamCaption})} Returns a list of files from the FTP server in the server\textquotesingle{}s long format for the given path or \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} if the path cannot be found. \begin{DoxyParams}{Parameters} {\em path} & The path or filename (or filename filter) to list (ex\+: {\ttfamily \char`\"{}/tmp/file$\ast$.\+txt\char`\"{}})\\ \hline \end{DoxyParams} \begin{DoxyReturn}{Returns} a list of files from the FTP server in the server\textquotesingle{}s long format for the given path or \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} if the path cannot be found \end{DoxyReturn} \begin{DoxyParagraph}{Events\+:} \mbox{\hyperlink{event_handling_EVENT_FTP_SEND_MESSAGE}{EVENT\+\_\+\+FTP\+\_\+\+SEND\+\_\+\+MESSAGE}}, \mbox{\hyperlink{event_handling_EVENT_FTP_MESSAGE_RECEIVED}{EVENT\+\_\+\+FTP\+\_\+\+MESSAGE\+\_\+\+RECEIVED}}, \mbox{\hyperlink{event_handling_EVENT_PACKET_READ}{EVENT\+\_\+\+PACKET\+\_\+\+READ}}, \mbox{\hyperlink{event_handling_EVENT_PACKET_SENT}{EVENT\+\_\+\+PACKET\+\_\+\+SENT}} \end{DoxyParagraph} \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{*string str = ftp.list(\textcolor{stringliteral}{"{}/tmp/file*.txt"{}});} \end{DoxyCode} \end{DoxyParagraph} \begin{DoxyExceptions}{Exceptions} {\em FTP-\/\+RECEIVE-\/\+ERROR} & Incomplete message received on control port \\ \hline {\em FTP-\/\+LIST-\/\+ERROR} & FTP server returned an error in response to the LIST command\\ \hline \end{DoxyExceptions} \begin{DoxyNote}{Note} see \mbox{\hyperlink{class_qore_1_1_ftp_client_aef811b62489b3f15a600acb662494b83}{Ftp\+Client\+::connect()}} for additional exceptions that could be thrown when connections are implicitly established \end{DoxyNote} \begin{DoxySeeAlso}{See also} \mbox{\hyperlink{class_qore_1_1_ftp_client_aa4905e4a78ade8053e709f094a7ed705}{Ftp\+Client\+::nlst()}} \end{DoxySeeAlso} \mbox{\Hypertarget{class_qore_1_1_ftp_client_a8d0ae5b88c272e4ae0f5113c5ae0d835}\label{class_qore_1_1_ftp_client_a8d0ae5b88c272e4ae0f5113c5ae0d835}} \index{Qore::FtpClient@{Qore::FtpClient}!mkdir@{mkdir}} \index{mkdir@{mkdir}!Qore::FtpClient@{Qore::FtpClient}} \doxysubsubsection{\texorpdfstring{mkdir()}{mkdir()}} {\footnotesize\ttfamily nothing Qore\+::\+Ftp\+Client\+::mkdir (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{remote\+\_\+path }\end{DoxyParamCaption})} Creates a directory on the FTP server; if any errors occur, an exception is thrown. \begin{DoxyParams}{Parameters} {\em remote\+\_\+path} & The path on the server to the directory to create\\ \hline \end{DoxyParams} \begin{DoxyParagraph}{Events\+:} \mbox{\hyperlink{event_handling_EVENT_FTP_SEND_MESSAGE}{EVENT\+\_\+\+FTP\+\_\+\+SEND\+\_\+\+MESSAGE}}, \mbox{\hyperlink{event_handling_EVENT_FTP_MESSAGE_RECEIVED}{EVENT\+\_\+\+FTP\+\_\+\+MESSAGE\+\_\+\+RECEIVED}}, \mbox{\hyperlink{event_handling_EVENT_PACKET_READ}{EVENT\+\_\+\+PACKET\+\_\+\+READ}}, \mbox{\hyperlink{event_handling_EVENT_PACKET_SENT}{EVENT\+\_\+\+PACKET\+\_\+\+SENT}} \end{DoxyParagraph} \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{ftp.mkdir(\textcolor{stringliteral}{"{}tmp"{}});} \end{DoxyCode} \end{DoxyParagraph} \begin{DoxyExceptions}{Exceptions} {\em FTP-\/\+RECEIVE-\/\+ERROR} & Incomplete message received on control port \\ \hline {\em FTP-\/\+MKDIR-\/\+ERROR} & FTP server returned an error to the {\ttfamily MKD} command\\ \hline \end{DoxyExceptions} \begin{DoxyNote}{Note} see \mbox{\hyperlink{class_qore_1_1_ftp_client_aef811b62489b3f15a600acb662494b83}{Ftp\+Client\+::connect()}} for additional exceptions that could be thrown when connections are implicitly established \end{DoxyNote} \mbox{\Hypertarget{class_qore_1_1_ftp_client_aa4905e4a78ade8053e709f094a7ed705}\label{class_qore_1_1_ftp_client_aa4905e4a78ade8053e709f094a7ed705}} \index{Qore::FtpClient@{Qore::FtpClient}!nlst@{nlst}} \index{nlst@{nlst}!Qore::FtpClient@{Qore::FtpClient}} \doxysubsubsection{\texorpdfstring{nlst()}{nlst()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}} {\footnotesize\ttfamily \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::\+Ftp\+Client\+::nlst (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})} Returns a list of file names from the FTP server in the current working directory or \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} if the path cannot be found. \begin{DoxyReturn}{Returns} a list of file names from the FTP server in the current working directory or \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} if the path cannot be found \end{DoxyReturn} \begin{DoxyParagraph}{Events\+:} \mbox{\hyperlink{event_handling_EVENT_FTP_SEND_MESSAGE}{EVENT\+\_\+\+FTP\+\_\+\+SEND\+\_\+\+MESSAGE}}, \mbox{\hyperlink{event_handling_EVENT_FTP_MESSAGE_RECEIVED}{EVENT\+\_\+\+FTP\+\_\+\+MESSAGE\+\_\+\+RECEIVED}}, \mbox{\hyperlink{event_handling_EVENT_PACKET_READ}{EVENT\+\_\+\+PACKET\+\_\+\+READ}}, \mbox{\hyperlink{event_handling_EVENT_PACKET_SENT}{EVENT\+\_\+\+PACKET\+\_\+\+SENT}} \end{DoxyParagraph} \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{*string str = ftp.nlst();} \end{DoxyCode} \end{DoxyParagraph} \begin{DoxyExceptions}{Exceptions} {\em FTP-\/\+RECEIVE-\/\+ERROR} & Incomplete message received on control port \\ \hline {\em FTP-\/\+LIST-\/\+ERROR} & FTP server returned an error in response to the NLST command\\ \hline \end{DoxyExceptions} \begin{DoxyNote}{Note} see \mbox{\hyperlink{class_qore_1_1_ftp_client_aef811b62489b3f15a600acb662494b83}{Ftp\+Client\+::connect()}} for additional exceptions that could be thrown when connections are implicitly established \end{DoxyNote} \begin{DoxySeeAlso}{See also} \mbox{\hyperlink{class_qore_1_1_ftp_client_a21409b36294103779bba4f872e6ff8aa}{Ftp\+Client\+::list()}} \end{DoxySeeAlso} \mbox{\Hypertarget{class_qore_1_1_ftp_client_a734bc75154487b7344b36f2d2eed84ae}\label{class_qore_1_1_ftp_client_a734bc75154487b7344b36f2d2eed84ae}} \index{Qore::FtpClient@{Qore::FtpClient}!nlst@{nlst}} \index{nlst@{nlst}!Qore::FtpClient@{Qore::FtpClient}} \doxysubsubsection{\texorpdfstring{nlst()}{nlst()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}} {\footnotesize\ttfamily \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::\+Ftp\+Client\+::nlst (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{path }\end{DoxyParamCaption})} Returns a list of file names from the FTP server for the given path or \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} if the path cannot be found. \begin{DoxyParams}{Parameters} {\em path} & The path or filename (or filename filter) to list (ex\+: {\ttfamily \char`\"{}/tmp/file$\ast$.\+txt\char`\"{}})\\ \hline \end{DoxyParams} \begin{DoxyReturn}{Returns} a list of file names from the FTP server for the given path or \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} if the path cannot be found \end{DoxyReturn} \begin{DoxyParagraph}{Events\+:} \mbox{\hyperlink{event_handling_EVENT_FTP_SEND_MESSAGE}{EVENT\+\_\+\+FTP\+\_\+\+SEND\+\_\+\+MESSAGE}}, \mbox{\hyperlink{event_handling_EVENT_FTP_MESSAGE_RECEIVED}{EVENT\+\_\+\+FTP\+\_\+\+MESSAGE\+\_\+\+RECEIVED}}, \mbox{\hyperlink{event_handling_EVENT_PACKET_READ}{EVENT\+\_\+\+PACKET\+\_\+\+READ}}, \mbox{\hyperlink{event_handling_EVENT_PACKET_SENT}{EVENT\+\_\+\+PACKET\+\_\+\+SENT}} \end{DoxyParagraph} \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{*string str = ftp.nlst(\textcolor{stringliteral}{"{}/tmp/file*.txt"{}});} \end{DoxyCode} \end{DoxyParagraph} \begin{DoxyExceptions}{Exceptions} {\em FTP-\/\+RECEIVE-\/\+ERROR} & Incomplete message received on control port \\ \hline {\em FTP-\/\+LIST-\/\+ERROR} & FTP server returned an error in response to the LIST command\\ \hline \end{DoxyExceptions} \begin{DoxyNote}{Note} see \mbox{\hyperlink{class_qore_1_1_ftp_client_aef811b62489b3f15a600acb662494b83}{Ftp\+Client\+::connect()}} for additional exceptions that could be thrown when connections are implicitly established \end{DoxyNote} \begin{DoxySeeAlso}{See also} \mbox{\hyperlink{class_qore_1_1_ftp_client_a21409b36294103779bba4f872e6ff8aa}{Ftp\+Client\+::list()}} \end{DoxySeeAlso} \mbox{\Hypertarget{class_qore_1_1_ftp_client_ac44baa2151f3a892bc96abe6d0e54714}\label{class_qore_1_1_ftp_client_ac44baa2151f3a892bc96abe6d0e54714}} \index{Qore::FtpClient@{Qore::FtpClient}!put@{put}} \index{put@{put}!Qore::FtpClient@{Qore::FtpClient}} \doxysubsubsection{\texorpdfstring{put()}{put()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}} {\footnotesize\ttfamily nothing Qore\+::\+Ftp\+Client\+::put (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{class_qore_1_1_input_stream}{Qore\+::\+Input\+Stream}}}]{is, }\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{remote\+\_\+path }\end{DoxyParamCaption})} Transfers the content of an \mbox{\hyperlink{class_qore_1_1_input_stream}{Input\+Stream}} to the FTP server; if any errors occur, an exception is thrown. \begin{DoxyParams}{Parameters} {\em is} & The input stream to send to the FTP server \\ \hline {\em remote\+\_\+path} & The name of the file on the server\\ \hline \end{DoxyParams} \begin{DoxyParagraph}{Events\+:} \mbox{\hyperlink{event_handling_EVENT_FTP_SEND_MESSAGE}{EVENT\+\_\+\+FTP\+\_\+\+SEND\+\_\+\+MESSAGE}}, \mbox{\hyperlink{event_handling_EVENT_FTP_MESSAGE_RECEIVED}{EVENT\+\_\+\+FTP\+\_\+\+MESSAGE\+\_\+\+RECEIVED}}, \mbox{\hyperlink{event_handling_EVENT_PACKET_READ}{EVENT\+\_\+\+PACKET\+\_\+\+READ}}, \mbox{\hyperlink{event_handling_EVENT_PACKET_SENT}{EVENT\+\_\+\+PACKET\+\_\+\+SENT}} \end{DoxyParagraph} \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{ftp.put(new FileInputStream(\textcolor{stringliteral}{"{}/tmp/file-\/1.txt"{}}), \textcolor{stringliteral}{"{}file.txt"{}});} \end{DoxyCode} \end{DoxyParagraph} \begin{DoxyExceptions}{Exceptions} {\em FTP-\/\+RECEIVE-\/\+ERROR} & Incomplete message received on control port \\ \hline {\em FTP-\/\+FILE-\/\+OPEN-\/\+ERROR} & Could not open local file for reading \\ \hline {\em FTP-\/\+FILE-\/\+PUT-\/\+ERROR} & Could not determine file size of local file (\mbox{\hyperlink{namespace_qore_ab58a26fdb5c2e9935729993e688bd5a8}{stat()}} failed) \\ \hline {\em FTP-\/\+PUT-\/\+ERROR} & An error occurred while sending the file\\ \hline \end{DoxyExceptions} \begin{DoxyNote}{Note} see \mbox{\hyperlink{class_qore_1_1_ftp_client_aef811b62489b3f15a600acb662494b83}{Ftp\+Client\+::connect()}} for additional exceptions that could be thrown when connections are implicitly established \end{DoxyNote} \begin{DoxySeeAlso}{See also} \mbox{\hyperlink{class_qore_1_1_ftp_client_aeb0580e5a740c437a18329ee6fab03f8}{Ftp\+Client\+::put\+Data()}} \end{DoxySeeAlso} \mbox{\Hypertarget{class_qore_1_1_ftp_client_a835c52e32ee089773d48574f297e7965}\label{class_qore_1_1_ftp_client_a835c52e32ee089773d48574f297e7965}} \index{Qore::FtpClient@{Qore::FtpClient}!put@{put}} \index{put@{put}!Qore::FtpClient@{Qore::FtpClient}} \doxysubsubsection{\texorpdfstring{put()}{put()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}} {\footnotesize\ttfamily nothing Qore\+::\+Ftp\+Client\+::put (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{local\+\_\+path, }\item[{\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{remote\+\_\+path }\end{DoxyParamCaption})} Transfers a local file to the FTP server; if any errors occur, an exception is thrown. \begin{DoxyParagraph}{Restrictions\+:} \mbox{\hyperlink{group__parse__options_ga5e466ed886222f0b57b0a399b455be71}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+FILESYSTEM}} \end{DoxyParagraph} \begin{DoxyParams}{Parameters} {\em local\+\_\+path} & The path on the local system of the file to send \\ \hline {\em remote\+\_\+path} & If given, where to save the file on the server (otherwise the local path is used)\\ \hline \end{DoxyParams} \begin{DoxyParagraph}{Events\+:} \mbox{\hyperlink{event_handling_EVENT_FTP_SEND_MESSAGE}{EVENT\+\_\+\+FTP\+\_\+\+SEND\+\_\+\+MESSAGE}}, \mbox{\hyperlink{event_handling_EVENT_FTP_MESSAGE_RECEIVED}{EVENT\+\_\+\+FTP\+\_\+\+MESSAGE\+\_\+\+RECEIVED}}, \mbox{\hyperlink{event_handling_EVENT_PACKET_READ}{EVENT\+\_\+\+PACKET\+\_\+\+READ}}, \mbox{\hyperlink{event_handling_EVENT_PACKET_SENT}{EVENT\+\_\+\+PACKET\+\_\+\+SENT}} \end{DoxyParagraph} \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{ftp.put(\textcolor{stringliteral}{"{}/tmp/file-\/1.txt"{}}, \textcolor{stringliteral}{"{}file.txt"{}});} \end{DoxyCode} \end{DoxyParagraph} \begin{DoxyExceptions}{Exceptions} {\em FTP-\/\+RECEIVE-\/\+ERROR} & Incomplete message received on control port \\ \hline {\em FTP-\/\+FILE-\/\+OPEN-\/\+ERROR} & Could not open local file for reading \\ \hline {\em FTP-\/\+FILE-\/\+PUT-\/\+ERROR} & Could not determine file size of local file (\mbox{\hyperlink{namespace_qore_ab58a26fdb5c2e9935729993e688bd5a8}{stat()}} failed) \\ \hline {\em FTP-\/\+PUT-\/\+ERROR} & An error occurred while sending the file\\ \hline \end{DoxyExceptions} \begin{DoxyNote}{Note} see \mbox{\hyperlink{class_qore_1_1_ftp_client_aef811b62489b3f15a600acb662494b83}{Ftp\+Client\+::connect()}} for additional exceptions that could be thrown when connections are implicitly established \end{DoxyNote} \begin{DoxySeeAlso}{See also} \mbox{\hyperlink{class_qore_1_1_ftp_client_aeb0580e5a740c437a18329ee6fab03f8}{Ftp\+Client\+::put\+Data()}} \end{DoxySeeAlso} \mbox{\Hypertarget{class_qore_1_1_ftp_client_a3434ced4c5c1c62a03e7722abcb24cfc}\label{class_qore_1_1_ftp_client_a3434ced4c5c1c62a03e7722abcb24cfc}} \index{Qore::FtpClient@{Qore::FtpClient}!putData@{putData}} \index{putData@{putData}!Qore::FtpClient@{Qore::FtpClient}} \doxysubsubsection{\texorpdfstring{putData()}{putData()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}} {\footnotesize\ttfamily nothing Qore\+::\+Ftp\+Client\+::put\+Data (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}}}]{data, }\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{remote\+\_\+path }\end{DoxyParamCaption})} Transfers binary data to the FTP server and saves it as a file on the remote machine; if any errors occur, an exception is thrown. \begin{DoxyParams}{Parameters} {\em data} & The file data to save on the remote server \\ \hline {\em remote\+\_\+path} & The path on the remote server for the file to save the data under\\ \hline \end{DoxyParams} \begin{DoxyParagraph}{Events\+:} \mbox{\hyperlink{event_handling_EVENT_FTP_SEND_MESSAGE}{EVENT\+\_\+\+FTP\+\_\+\+SEND\+\_\+\+MESSAGE}}, \mbox{\hyperlink{event_handling_EVENT_FTP_MESSAGE_RECEIVED}{EVENT\+\_\+\+FTP\+\_\+\+MESSAGE\+\_\+\+RECEIVED}}, \mbox{\hyperlink{event_handling_EVENT_PACKET_READ}{EVENT\+\_\+\+PACKET\+\_\+\+READ}}, \mbox{\hyperlink{event_handling_EVENT_PACKET_SENT}{EVENT\+\_\+\+PACKET\+\_\+\+SENT}} \end{DoxyParagraph} \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{ftp.putData(bin, \textcolor{stringliteral}{"{}file.pdf"{}});} \end{DoxyCode} \end{DoxyParagraph} \begin{DoxyExceptions}{Exceptions} {\em FTP-\/\+RECEIVE-\/\+ERROR} & Incomplete message received on control port \\ \hline {\em FTP-\/\+PUT-\/\+ERROR} & An error occurred while sending the file\\ \hline \end{DoxyExceptions} \begin{DoxyNote}{Note} see \mbox{\hyperlink{class_qore_1_1_ftp_client_aef811b62489b3f15a600acb662494b83}{Ftp\+Client\+::connect()}} for additional exceptions that could be thrown when connections are implicitly established \end{DoxyNote} \mbox{\Hypertarget{class_qore_1_1_ftp_client_aeb0580e5a740c437a18329ee6fab03f8}\label{class_qore_1_1_ftp_client_aeb0580e5a740c437a18329ee6fab03f8}} \index{Qore::FtpClient@{Qore::FtpClient}!putData@{putData}} \index{putData@{putData}!Qore::FtpClient@{Qore::FtpClient}} \doxysubsubsection{\texorpdfstring{putData()}{putData()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}} {\footnotesize\ttfamily nothing Qore\+::\+Ftp\+Client\+::put\+Data (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{data, }\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{remote\+\_\+path }\end{DoxyParamCaption})} Transfers string data to the FTP server and saves it as a file on the remote machine; if any errors occur, an exception is thrown. \begin{DoxyParams}{Parameters} {\em data} & The file data to save on the remote server \\ \hline {\em remote\+\_\+path} & The path on the remote server for the file to save the data under\\ \hline \end{DoxyParams} \begin{DoxyParagraph}{Events\+:} \mbox{\hyperlink{event_handling_EVENT_FTP_SEND_MESSAGE}{EVENT\+\_\+\+FTP\+\_\+\+SEND\+\_\+\+MESSAGE}}, \mbox{\hyperlink{event_handling_EVENT_FTP_MESSAGE_RECEIVED}{EVENT\+\_\+\+FTP\+\_\+\+MESSAGE\+\_\+\+RECEIVED}}, \mbox{\hyperlink{event_handling_EVENT_PACKET_READ}{EVENT\+\_\+\+PACKET\+\_\+\+READ}}, \mbox{\hyperlink{event_handling_EVENT_PACKET_SENT}{EVENT\+\_\+\+PACKET\+\_\+\+SENT}} \end{DoxyParagraph} \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{ftp.putData(str, \textcolor{stringliteral}{"{}file.txt"{}});} \end{DoxyCode} \end{DoxyParagraph} \begin{DoxyExceptions}{Exceptions} {\em FTP-\/\+RECEIVE-\/\+ERROR} & Incomplete message received on control port \\ \hline {\em FTP-\/\+PUT-\/\+ERROR} & An error occurred while sending the file\\ \hline \end{DoxyExceptions} \begin{DoxyNote}{Note} see \mbox{\hyperlink{class_qore_1_1_ftp_client_aef811b62489b3f15a600acb662494b83}{Ftp\+Client\+::connect()}} for additional exceptions that could be thrown when connections are implicitly established \end{DoxyNote} \mbox{\Hypertarget{class_qore_1_1_ftp_client_a50427e074d3f14757491ad26295d7e6b}\label{class_qore_1_1_ftp_client_a50427e074d3f14757491ad26295d7e6b}} \index{Qore::FtpClient@{Qore::FtpClient}!pwd@{pwd}} \index{pwd@{pwd}!Qore::FtpClient@{Qore::FtpClient}} \doxysubsubsection{\texorpdfstring{pwd()}{pwd()}} {\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::\+Ftp\+Client\+::pwd (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})} Returns the server-\/side current working directory. \begin{DoxyReturn}{Returns} the server-\/side current working directory \end{DoxyReturn} \begin{DoxyParagraph}{Events\+:} \mbox{\hyperlink{event_handling_EVENT_FTP_SEND_MESSAGE}{EVENT\+\_\+\+FTP\+\_\+\+SEND\+\_\+\+MESSAGE}}, \mbox{\hyperlink{event_handling_EVENT_FTP_MESSAGE_RECEIVED}{EVENT\+\_\+\+FTP\+\_\+\+MESSAGE\+\_\+\+RECEIVED}}, \mbox{\hyperlink{event_handling_EVENT_PACKET_READ}{EVENT\+\_\+\+PACKET\+\_\+\+READ}}, \mbox{\hyperlink{event_handling_EVENT_PACKET_SENT}{EVENT\+\_\+\+PACKET\+\_\+\+SENT}} \end{DoxyParagraph} \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{string str = ftp.pwd();} \end{DoxyCode} \end{DoxyParagraph} \begin{DoxyExceptions}{Exceptions} {\em FTP-\/\+RECEIVE-\/\+ERROR} & Incomplete message received on control port \\ \hline {\em FTP-\/\+PWD-\/\+ERROR} & FTP server returned an error to the PWD command\\ \hline \end{DoxyExceptions} \begin{DoxyNote}{Note} see \mbox{\hyperlink{class_qore_1_1_ftp_client_aef811b62489b3f15a600acb662494b83}{Ftp\+Client\+::connect()}} for additional exceptions that could be thrown when connections are implicitly established \end{DoxyNote} \mbox{\Hypertarget{class_qore_1_1_ftp_client_ac860bd11c765ed26e9f94bdc359c0d9e}\label{class_qore_1_1_ftp_client_ac860bd11c765ed26e9f94bdc359c0d9e}} \index{Qore::FtpClient@{Qore::FtpClient}!rename@{rename}} \index{rename@{rename}!Qore::FtpClient@{Qore::FtpClient}} \doxysubsubsection{\texorpdfstring{rename()}{rename()}} {\footnotesize\ttfamily nothing Qore\+::\+Ftp\+Client\+::rename (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{from, }\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{to }\end{DoxyParamCaption})} Renames/moves a file or directory; if any errors occur, an exception is thrown. \begin{DoxyParams}{Parameters} {\em from} & The original file path on the server to rename/move \\ \hline {\em to} & The new path on the server\\ \hline \end{DoxyParams} \begin{DoxyParagraph}{Events\+:} \mbox{\hyperlink{event_handling_EVENT_FTP_SEND_MESSAGE}{EVENT\+\_\+\+FTP\+\_\+\+SEND\+\_\+\+MESSAGE}}, \mbox{\hyperlink{event_handling_EVENT_FTP_MESSAGE_RECEIVED}{EVENT\+\_\+\+FTP\+\_\+\+MESSAGE\+\_\+\+RECEIVED}}, \mbox{\hyperlink{event_handling_EVENT_PACKET_READ}{EVENT\+\_\+\+PACKET\+\_\+\+READ}}, \mbox{\hyperlink{event_handling_EVENT_PACKET_SENT}{EVENT\+\_\+\+PACKET\+\_\+\+SENT}} \end{DoxyParagraph} \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{ftp.rename(\textcolor{stringliteral}{"{}file.txt"{}}, \textcolor{stringliteral}{"{}file.txt.orig"{}});} \end{DoxyCode} \end{DoxyParagraph} \begin{DoxyExceptions}{Exceptions} {\em FTP-\/\+RECEIVE-\/\+ERROR} & Incomplete message received on control port \\ \hline {\em FTP-\/\+RENAME-\/\+ERROR} & FTP server returned an error to the {\ttfamily RNFR} or {\ttfamily RNTO} commands\\ \hline \end{DoxyExceptions} \begin{DoxyNote}{Note} see \mbox{\hyperlink{class_qore_1_1_ftp_client_aef811b62489b3f15a600acb662494b83}{Ftp\+Client\+::connect()}} for additional exceptions that could be thrown when connections are implicitly established \end{DoxyNote} \mbox{\Hypertarget{class_qore_1_1_ftp_client_ac375463bf297a16943a1cd63d3be3068}\label{class_qore_1_1_ftp_client_ac375463bf297a16943a1cd63d3be3068}} \index{Qore::FtpClient@{Qore::FtpClient}!rmdir@{rmdir}} \index{rmdir@{rmdir}!Qore::FtpClient@{Qore::FtpClient}} \doxysubsubsection{\texorpdfstring{rmdir()}{rmdir()}} {\footnotesize\ttfamily nothing Qore\+::\+Ftp\+Client\+::rmdir (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{remote\+\_\+path }\end{DoxyParamCaption})} Removes a directory on the remote FTP server; if any errors occur, an exception is thrown. \begin{DoxyParams}{Parameters} {\em remote\+\_\+path} & The path on the server to the directory to delete\\ \hline \end{DoxyParams} \begin{DoxyParagraph}{Events\+:} \mbox{\hyperlink{event_handling_EVENT_FTP_SEND_MESSAGE}{EVENT\+\_\+\+FTP\+\_\+\+SEND\+\_\+\+MESSAGE}}, \mbox{\hyperlink{event_handling_EVENT_FTP_MESSAGE_RECEIVED}{EVENT\+\_\+\+FTP\+\_\+\+MESSAGE\+\_\+\+RECEIVED}}, \mbox{\hyperlink{event_handling_EVENT_PACKET_READ}{EVENT\+\_\+\+PACKET\+\_\+\+READ}}, \mbox{\hyperlink{event_handling_EVENT_PACKET_SENT}{EVENT\+\_\+\+PACKET\+\_\+\+SENT}} \end{DoxyParagraph} \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{ftp.rmdir(\textcolor{stringliteral}{"{}tmp"{}});} \end{DoxyCode} \end{DoxyParagraph} \begin{DoxyExceptions}{Exceptions} {\em FTP-\/\+RECEIVE-\/\+ERROR} & Incomplete message received on control port \\ \hline {\em FTP-\/\+RMDIR-\/\+ERROR} & FTP server returned an error to the {\ttfamily RMD} command\\ \hline \end{DoxyExceptions} \begin{DoxyNote}{Note} see \mbox{\hyperlink{class_qore_1_1_ftp_client_aef811b62489b3f15a600acb662494b83}{Ftp\+Client\+::connect()}} for additional exceptions that could be thrown when connections are implicitly established \end{DoxyNote} \mbox{\Hypertarget{class_qore_1_1_ftp_client_a39423f304cf2777d89ba866dc3de5181}\label{class_qore_1_1_ftp_client_a39423f304cf2777d89ba866dc3de5181}} \index{Qore::FtpClient@{Qore::FtpClient}!sendControlMessage@{sendControlMessage}} \index{sendControlMessage@{sendControlMessage}!Qore::FtpClient@{Qore::FtpClient}} \doxysubsubsection{\texorpdfstring{sendControlMessage()}{sendControlMessage()}} {\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga0231dbb472dd230310af7c7c34f56e92}{hash}}$<$\mbox{\hyperlink{struct_qore_1_1_ftp_response_info}{Ftp\+Response\+Info}}$>$ Qore\+::\+Ftp\+Client\+::send\+Control\+Message (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{cmd, }\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{arg }\end{DoxyParamCaption})} Sends a message on the control connection with a reply on the control connection only. \begin{DoxyParams}{Parameters} {\em cmd} & the FTP command to send \\ \hline {\em arg} & the argument for the command\\ \hline \end{DoxyParams} \begin{DoxyReturn}{Returns} the response from the FTP server \end{DoxyReturn} \begin{DoxyNote}{Note} This method is for commands only on the control connection; no data connection is possible with this method \end{DoxyNote} \begin{DoxySince}{Since} Qore 0.\+9.\+4 \end{DoxySince} \mbox{\Hypertarget{class_qore_1_1_ftp_client_a8e7b3685bc3ac840bf64896f7d1868c3}\label{class_qore_1_1_ftp_client_a8e7b3685bc3ac840bf64896f7d1868c3}} \index{Qore::FtpClient@{Qore::FtpClient}!setControlEventQueue@{setControlEventQueue}} \index{setControlEventQueue@{setControlEventQueue}!Qore::FtpClient@{Qore::FtpClient}} \doxysubsubsection{\texorpdfstring{setControlEventQueue()}{setControlEventQueue()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}} {\footnotesize\ttfamily nothing Qore\+::\+Ftp\+Client\+::set\+Control\+Event\+Queue (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})} Clears any Queue object that may be set on the \mbox{\hyperlink{class_qore_1_1_ftp_client}{Ftp\+Client}} object so that \mbox{\hyperlink{event_handling}{I/O events}} are no longer captured on the object on the control connection. \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{ftp.setControlEventQueue();} \end{DoxyCode} \end{DoxyParagraph} \mbox{\Hypertarget{class_qore_1_1_ftp_client_ae51ff78ef9a8f84af0e59ebd6065cc99}\label{class_qore_1_1_ftp_client_ae51ff78ef9a8f84af0e59ebd6065cc99}} \index{Qore::FtpClient@{Qore::FtpClient}!setControlEventQueue@{setControlEventQueue}} \index{setControlEventQueue@{setControlEventQueue}!Qore::FtpClient@{Qore::FtpClient}} \doxysubsubsection{\texorpdfstring{setControlEventQueue()}{setControlEventQueue()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}} {\footnotesize\ttfamily nothing Qore\+::\+Ftp\+Client\+::set\+Control\+Event\+Queue (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{class_qore_1_1_thread_1_1_queue}{Qore\+::\+Thread\+::\+Queue}}}]{queue, }\item[{auto}]{arg, }\item[{\+\_\+\+\_\+7\+\_\+ bool}]{with\+\_\+data }\end{DoxyParamCaption})} Sets a Queue object to receive \mbox{\hyperlink{class_qore_1_1_ftp_client}{Ftp\+Client}} and \mbox{\hyperlink{class_qore_1_1_socket}{Socket}} events on the control connection. \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{ftp.setControlEventQueue(queue);} \end{DoxyCode} \end{DoxyParagraph} \begin{DoxyParams}{Parameters} {\em queue} & a \mbox{\hyperlink{class_qore_1_1_thread_1_1_queue}{Queue}} object to receive \mbox{\hyperlink{class_qore_1_1_ftp_client}{Ftp\+Client}} and \mbox{\hyperlink{class_qore_1_1_socket}{Socket}} events on the control connection; note that the Queue passed cannot have any maximum size set or a QUEUE-\/\+ERROR will be thrown \\ \hline {\em arg} & an argument that will be included in each event hash in the {\itshape arg} key \\ \hline {\em with\+\_\+data} & if \mbox{\hyperlink{basic_data_types_True}{True}}, then the actual raw data transferred / received is also included in the events\\ \hline \end{DoxyParams} \begin{DoxyExceptions}{Exceptions} {\em QUEUE-\/\+ERROR} & the Queue passed has a maximum size set\\ \hline \end{DoxyExceptions} \begin{DoxySeeAlso}{See also} event\+\_\+handling for more information \end{DoxySeeAlso} \begin{DoxySince}{Since} Qore 0.\+9.\+4 added the {\itshape arg} and {\itshape with\+\_\+data} options \end{DoxySince} \mbox{\Hypertarget{class_qore_1_1_ftp_client_a653ffafc1bd4b8da05f9ce18cc7fe854}\label{class_qore_1_1_ftp_client_a653ffafc1bd4b8da05f9ce18cc7fe854}} \index{Qore::FtpClient@{Qore::FtpClient}!setDataEventQueue@{setDataEventQueue}} \index{setDataEventQueue@{setDataEventQueue}!Qore::FtpClient@{Qore::FtpClient}} \doxysubsubsection{\texorpdfstring{setDataEventQueue()}{setDataEventQueue()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}} {\footnotesize\ttfamily nothing Qore\+::\+Ftp\+Client\+::set\+Data\+Event\+Queue (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})} Clears any Queue object that may be set on the \mbox{\hyperlink{class_qore_1_1_ftp_client}{Ftp\+Client}} object so that \mbox{\hyperlink{event_handling}{I/O events}} are no longer captured on the object on the data connection. \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{ftp.setDataEventQueue();} \end{DoxyCode} \end{DoxyParagraph} \mbox{\Hypertarget{class_qore_1_1_ftp_client_a5f8cd2947b40c6cec7d24e96aa02b485}\label{class_qore_1_1_ftp_client_a5f8cd2947b40c6cec7d24e96aa02b485}} \index{Qore::FtpClient@{Qore::FtpClient}!setDataEventQueue@{setDataEventQueue}} \index{setDataEventQueue@{setDataEventQueue}!Qore::FtpClient@{Qore::FtpClient}} \doxysubsubsection{\texorpdfstring{setDataEventQueue()}{setDataEventQueue()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}} {\footnotesize\ttfamily nothing Qore\+::\+Ftp\+Client\+::set\+Data\+Event\+Queue (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{class_qore_1_1_thread_1_1_queue}{Qore\+::\+Thread\+::\+Queue}}}]{queue, }\item[{auto}]{arg, }\item[{\+\_\+\+\_\+7\+\_\+ bool}]{with\+\_\+data }\end{DoxyParamCaption})} Sets a Queue object to receive \mbox{\hyperlink{class_qore_1_1_ftp_client}{Ftp\+Client}} and \mbox{\hyperlink{class_qore_1_1_socket}{Socket}} events on the data connection. \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{ftp.setDataEventQueue(queue);} \end{DoxyCode} \end{DoxyParagraph} \begin{DoxyParams}{Parameters} {\em queue} & a \mbox{\hyperlink{class_qore_1_1_thread_1_1_queue}{Queue}} object to receive \mbox{\hyperlink{class_qore_1_1_ftp_client}{Ftp\+Client}} and \mbox{\hyperlink{class_qore_1_1_socket}{Socket}} events on the data connection; note that the Queue passed cannot have any maximum size set or a QUEUE-\/\+ERROR will be thrown \\ \hline {\em arg} & an argument that will be included in each event hash in the {\itshape arg} key \\ \hline {\em with\+\_\+data} & if \mbox{\hyperlink{basic_data_types_True}{True}}, then the actual raw data transferred / received is also included in the events\\ \hline \end{DoxyParams} \begin{DoxyExceptions}{Exceptions} {\em QUEUE-\/\+ERROR} & the Queue passed has a maximum size set\\ \hline \end{DoxyExceptions} \begin{DoxySeeAlso}{See also} event\+\_\+handling for more information \end{DoxySeeAlso} \begin{DoxySince}{Since} Qore 0.\+9.\+4 added the {\itshape arg} and {\itshape with\+\_\+data} options \end{DoxySince} \mbox{\Hypertarget{class_qore_1_1_ftp_client_a105c9076a7dd0e0cd58b0a562545cb77}\label{class_qore_1_1_ftp_client_a105c9076a7dd0e0cd58b0a562545cb77}} \index{Qore::FtpClient@{Qore::FtpClient}!setEventQueue@{setEventQueue}} \index{setEventQueue@{setEventQueue}!Qore::FtpClient@{Qore::FtpClient}} \doxysubsubsection{\texorpdfstring{setEventQueue()}{setEventQueue()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}} {\footnotesize\ttfamily nothing Qore\+::\+Ftp\+Client\+::set\+Event\+Queue (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})} Clears any Queue object that may be set on the \mbox{\hyperlink{class_qore_1_1_ftp_client}{Ftp\+Client}} object so that \mbox{\hyperlink{event_handling}{I/O events}} are no longer captured on the object on either the data or control connections. \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{ftp.setEventQueue();} \end{DoxyCode} \end{DoxyParagraph} \mbox{\Hypertarget{class_qore_1_1_ftp_client_a17b15d37c6dce414ef13e374f2d39b8d}\label{class_qore_1_1_ftp_client_a17b15d37c6dce414ef13e374f2d39b8d}} \index{Qore::FtpClient@{Qore::FtpClient}!setEventQueue@{setEventQueue}} \index{setEventQueue@{setEventQueue}!Qore::FtpClient@{Qore::FtpClient}} \doxysubsubsection{\texorpdfstring{setEventQueue()}{setEventQueue()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}} {\footnotesize\ttfamily nothing Qore\+::\+Ftp\+Client\+::set\+Event\+Queue (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{class_qore_1_1_thread_1_1_queue}{Qore\+::\+Thread\+::\+Queue}}}]{queue, }\item[{auto}]{arg, }\item[{\+\_\+\+\_\+7\+\_\+ bool}]{with\+\_\+data }\end{DoxyParamCaption})} Sets a Queue object to receive \mbox{\hyperlink{class_qore_1_1_ftp_client}{Ftp\+Client}} and \mbox{\hyperlink{class_qore_1_1_socket}{Socket}} events on both the data and control connections. \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{ftp.setEventQueue(queue);} \end{DoxyCode} \end{DoxyParagraph} \begin{DoxyParams}{Parameters} {\em queue} & a \mbox{\hyperlink{class_qore_1_1_thread_1_1_queue}{Queue}} object to receive \mbox{\hyperlink{class_qore_1_1_ftp_client}{Ftp\+Client}} and \mbox{\hyperlink{class_qore_1_1_socket}{Socket}} events on both the data and control connections; note that the Queue passed cannot have any maximum size set or a QUEUE-\/\+ERROR will be thrown \\ \hline {\em arg} & an argument that will be included in each event hash in the {\itshape arg} key \\ \hline {\em with\+\_\+data} & if \mbox{\hyperlink{basic_data_types_True}{True}}, then the actual raw data transferred / received is also included in the events\\ \hline \end{DoxyParams} \begin{DoxyExceptions}{Exceptions} {\em QUEUE-\/\+ERROR} & the Queue passed has a maximum size set\\ \hline \end{DoxyExceptions} \begin{DoxySeeAlso}{See also} event\+\_\+handling for more information \end{DoxySeeAlso} \begin{DoxySince}{Since} Qore 0.\+9.\+4 added the {\itshape arg} and {\itshape with\+\_\+data} options \end{DoxySince} \mbox{\Hypertarget{class_qore_1_1_ftp_client_ab32919fb108c2ccfd9b7c7f019c643b2}\label{class_qore_1_1_ftp_client_ab32919fb108c2ccfd9b7c7f019c643b2}} \index{Qore::FtpClient@{Qore::FtpClient}!setHostName@{setHostName}} \index{setHostName@{setHostName}!Qore::FtpClient@{Qore::FtpClient}} \doxysubsubsection{\texorpdfstring{setHostName()}{setHostName()}} {\footnotesize\ttfamily nothing Qore\+::\+Ftp\+Client\+::set\+Host\+Name (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{host }\end{DoxyParamCaption})} Sets the hostname or address to use to connect to for the next connection. \begin{DoxyParams}{Parameters} {\em host} & the hostname or address to use to connect to for the next connection\\ \hline \end{DoxyParams} \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{ftp.setHostName(\textcolor{stringliteral}{"{}example.com"{}});} \end{DoxyCode} \end{DoxyParagraph} \mbox{\Hypertarget{class_qore_1_1_ftp_client_ae21b39b2a5d10f7f43373079f21fe037}\label{class_qore_1_1_ftp_client_ae21b39b2a5d10f7f43373079f21fe037}} \index{Qore::FtpClient@{Qore::FtpClient}!setInsecure@{setInsecure}} \index{setInsecure@{setInsecure}!Qore::FtpClient@{Qore::FtpClient}} \doxysubsubsection{\texorpdfstring{setInsecure()}{setInsecure()}} {\footnotesize\ttfamily nothing Qore\+::\+Ftp\+Client\+::set\+Insecure (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})} Make a non-\/encrypted connection to the server on the next connect. \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{ftp.setInsecure();} \end{DoxyCode} \end{DoxyParagraph} \begin{DoxyExceptions}{Exceptions} {\em SET-\/\+INSECURE-\/\+ERROR} & this method cannot be called while the control connection is established \\ \hline \end{DoxyExceptions} \mbox{\Hypertarget{class_qore_1_1_ftp_client_a6a996c6bac1918d38e2088261500fcef}\label{class_qore_1_1_ftp_client_a6a996c6bac1918d38e2088261500fcef}} \index{Qore::FtpClient@{Qore::FtpClient}!setInsecureData@{setInsecureData}} \index{setInsecureData@{setInsecureData}!Qore::FtpClient@{Qore::FtpClient}} \doxysubsubsection{\texorpdfstring{setInsecureData()}{setInsecureData()}} {\footnotesize\ttfamily nothing Qore\+::\+Ftp\+Client\+::set\+Insecure\+Data (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})} Make a non-\/encrypted data connection to the server on the next connect even if the control connection is secure. \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{ftp.setSecure();} \DoxyCodeLine{ftp.setInsecureData();} \end{DoxyCode} \end{DoxyParagraph} \begin{DoxyExceptions}{Exceptions} {\em SET-\/\+INSECUREDATA-\/\+ERROR} & this method cannot be called while the control connection is established \\ \hline \end{DoxyExceptions} \mbox{\Hypertarget{class_qore_1_1_ftp_client_acc11045af149c681bb3a1ddd1657ca36}\label{class_qore_1_1_ftp_client_acc11045af149c681bb3a1ddd1657ca36}} \index{Qore::FtpClient@{Qore::FtpClient}!setModeAuto@{setModeAuto}} \index{setModeAuto@{setModeAuto}!Qore::FtpClient@{Qore::FtpClient}} \doxysubsubsection{\texorpdfstring{setModeAuto()}{setModeAuto()}} {\footnotesize\ttfamily nothing Qore\+::\+Ftp\+Client\+::set\+Mode\+Auto (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})} Sets the object to automatically try to negotiate the data connections in {\ttfamily EPSV}, {\ttfamily PASV}, and {\ttfamily PORT} modes, in that order. \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{ftp.setModeAuto();} \end{DoxyCode} \end{DoxyParagraph} \mbox{\Hypertarget{class_qore_1_1_ftp_client_a9dd1291cef32804febcdf577ac537424}\label{class_qore_1_1_ftp_client_a9dd1291cef32804febcdf577ac537424}} \index{Qore::FtpClient@{Qore::FtpClient}!setModeEPSV@{setModeEPSV}} \index{setModeEPSV@{setModeEPSV}!Qore::FtpClient@{Qore::FtpClient}} \doxysubsubsection{\texorpdfstring{setModeEPSV()}{setModeEPSV()}} {\footnotesize\ttfamily nothing Qore\+::\+Ftp\+Client\+::set\+Mode\+EPSV (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})} Sets the object to only try to make data connections using {\ttfamily EPSV} (\href{http://tools.ietf.org/html/rfc2428}{\texttt{ RFC-\/2428}} extended passive) mode. \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{ftp.setModeEPSV();} \end{DoxyCode} \end{DoxyParagraph} \mbox{\Hypertarget{class_qore_1_1_ftp_client_a1c622625f391e801b4af7bf802c577cf}\label{class_qore_1_1_ftp_client_a1c622625f391e801b4af7bf802c577cf}} \index{Qore::FtpClient@{Qore::FtpClient}!setModePASV@{setModePASV}} \index{setModePASV@{setModePASV}!Qore::FtpClient@{Qore::FtpClient}} \doxysubsubsection{\texorpdfstring{setModePASV()}{setModePASV()}} {\footnotesize\ttfamily nothing Qore\+::\+Ftp\+Client\+::set\+Mode\+PASV (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})} Sets the object to only try to make data connections using {\ttfamily PASV} (\href{http://tools.ietf.org/html/rfc959}{\texttt{ RFC-\/959}} passive) mode. \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{ftp.setModePASV();} \end{DoxyCode} \end{DoxyParagraph} \mbox{\Hypertarget{class_qore_1_1_ftp_client_ae66f4b1496453fb2f101c86c868742f4}\label{class_qore_1_1_ftp_client_ae66f4b1496453fb2f101c86c868742f4}} \index{Qore::FtpClient@{Qore::FtpClient}!setModePORT@{setModePORT}} \index{setModePORT@{setModePORT}!Qore::FtpClient@{Qore::FtpClient}} \doxysubsubsection{\texorpdfstring{setModePORT()}{setModePORT()}} {\footnotesize\ttfamily nothing Qore\+::\+Ftp\+Client\+::set\+Mode\+PORT (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})} Sets the object to only try to make data connections using {\ttfamily PORT} mode. \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{ftp.setModePORT();} \end{DoxyCode} \end{DoxyParagraph} \mbox{\Hypertarget{class_qore_1_1_ftp_client_a1ced03072c695abf25df4d419b64dfa0}\label{class_qore_1_1_ftp_client_a1ced03072c695abf25df4d419b64dfa0}} \index{Qore::FtpClient@{Qore::FtpClient}!setNetworkFamily@{setNetworkFamily}} \index{setNetworkFamily@{setNetworkFamily}!Qore::FtpClient@{Qore::FtpClient}} \doxysubsubsection{\texorpdfstring{setNetworkFamily()}{setNetworkFamily()}} {\footnotesize\ttfamily nothing Qore\+::\+Ftp\+Client\+::set\+Network\+Family (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}}}]{family }\end{DoxyParamCaption})} Sets the network address family to use for new connections; use this method to restrict connections to IPv4 or IPv6 connections. \begin{DoxyParams}{Parameters} {\em family} & the network address family to use for new connections; see \mbox{\hyperlink{group__network__address__family__constants}{Network Address Family Constants}} for valid values; use \mbox{\hyperlink{group__network__address__family__constants_gac4f81abe9d374562b41117c51950fb80}{Qore\+::\+AF\+\_\+\+UNSPEC}} to automatically choose the family (the default)\\ \hline \end{DoxyParams} \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{ftp.setNetworkFamily(AF\_INET);} \end{DoxyCode} \end{DoxyParagraph} \begin{DoxyExceptions}{Exceptions} {\em FTPCLIENT-\/\+SETNETWORKFAMILY-\/\+ERROR} & invalid or unknown network family\\ \hline \end{DoxyExceptions} \begin{DoxySince}{Since} Qore 0.\+9.\+0 \end{DoxySince} \mbox{\Hypertarget{class_qore_1_1_ftp_client_afbbcc2baf05d46c3f96fa2d2f8546d86}\label{class_qore_1_1_ftp_client_afbbcc2baf05d46c3f96fa2d2f8546d86}} \index{Qore::FtpClient@{Qore::FtpClient}!setPassword@{setPassword}} \index{setPassword@{setPassword}!Qore::FtpClient@{Qore::FtpClient}} \doxysubsubsection{\texorpdfstring{setPassword()}{setPassword()}} {\footnotesize\ttfamily nothing Qore\+::\+Ftp\+Client\+::set\+Password (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{pass }\end{DoxyParamCaption})} Sets the password to use for the next connection. \begin{DoxyParams}{Parameters} {\em pass} & the password to use for the next connection\\ \hline \end{DoxyParams} \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{ftp.setPassword(\textcolor{stringliteral}{"{}ftp"{}});} \end{DoxyCode} \end{DoxyParagraph} \mbox{\Hypertarget{class_qore_1_1_ftp_client_aab84947c2e5f474714f0456163954d60}\label{class_qore_1_1_ftp_client_aab84947c2e5f474714f0456163954d60}} \index{Qore::FtpClient@{Qore::FtpClient}!setPort@{setPort}} \index{setPort@{setPort}!Qore::FtpClient@{Qore::FtpClient}} \doxysubsubsection{\texorpdfstring{setPort()}{setPort()}} {\footnotesize\ttfamily nothing Qore\+::\+Ftp\+Client\+::set\+Port (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}}}]{port }\end{DoxyParamCaption})} Sets the control port value to use for the next connection (the FTP protocol default is 21) \begin{DoxyParams}{Parameters} {\em port} & the control port value to use for the next connection (the FTP protocol default is 21); must be $>$ 0 or an FTPCLIENT-\/\+SETPORT-\/\+PARAMETER-\/\+ERROR exception is raised\\ \hline \end{DoxyParams} \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{ftp.setPort(2021);} \end{DoxyCode} \end{DoxyParagraph} \begin{DoxyExceptions}{Exceptions} {\em FTPCLIENT-\/\+SETPORT-\/\+PARAMETER-\/\+ERROR} & port $<$= 0 number passed as argument \\ \hline \end{DoxyExceptions} \mbox{\Hypertarget{class_qore_1_1_ftp_client_a093c4791c32406da7f141f68fb0ced9b}\label{class_qore_1_1_ftp_client_a093c4791c32406da7f141f68fb0ced9b}} \index{Qore::FtpClient@{Qore::FtpClient}!setSecure@{setSecure}} \index{setSecure@{setSecure}!Qore::FtpClient@{Qore::FtpClient}} \doxysubsubsection{\texorpdfstring{setSecure()}{setSecure()}} {\footnotesize\ttfamily nothing Qore\+::\+Ftp\+Client\+::set\+Secure (\begin{DoxyParamCaption}\item[{bool}]{secure = {\ttfamily \mbox{\hyperlink{group__boolean__constants_ga3ba2df91713a6249449347131ea526c3}{True}}} }\end{DoxyParamCaption})} Make an FTPS connection to the server on the next connect if the argument is \mbox{\hyperlink{basic_data_types_True}{True}}. \begin{DoxyParams}{Parameters} {\em secure} & Make an FTPS connection to the server on the next connect if the argument is \mbox{\hyperlink{basic_data_types_True}{True}}; make a cleartext connection if the argument is \mbox{\hyperlink{basic_data_types_False}{False}}\\ \hline \end{DoxyParams} \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{ftp.setSecure(\textcolor{keyword}{True});} \end{DoxyCode} \end{DoxyParagraph} \begin{DoxyExceptions}{Exceptions} {\em SET-\/\+SECURE-\/\+ERROR} & this method cannot be called while the control connection is established \\ \hline \end{DoxyExceptions} \mbox{\Hypertarget{class_qore_1_1_ftp_client_a024e4f784381a2ff516e204e7bd9f383}\label{class_qore_1_1_ftp_client_a024e4f784381a2ff516e204e7bd9f383}} \index{Qore::FtpClient@{Qore::FtpClient}!setTimeout@{setTimeout}} \index{setTimeout@{setTimeout}!Qore::FtpClient@{Qore::FtpClient}} \doxysubsubsection{\texorpdfstring{setTimeout()}{setTimeout()}} {\footnotesize\ttfamily Qore\+::\+Ftp\+Client\+::set\+Timeout (\begin{DoxyParamCaption}\item[{timeout}]{timeout\+\_\+ms }\end{DoxyParamCaption})} sets the socket I/O timeout value in milliseconds \begin{DoxyParams}{Parameters} {\em timeout\+\_\+ms} & the timeout value in milliseconds\\ \hline \end{DoxyParams} \begin{DoxySince}{Since} Qore 0.\+8.\+12.\+3 \end{DoxySince} \mbox{\Hypertarget{class_qore_1_1_ftp_client_a592c70037c05cbe3e89172c2d8c4883a}\label{class_qore_1_1_ftp_client_a592c70037c05cbe3e89172c2d8c4883a}} \index{Qore::FtpClient@{Qore::FtpClient}!setURL@{setURL}} \index{setURL@{setURL}!Qore::FtpClient@{Qore::FtpClient}} \doxysubsubsection{\texorpdfstring{setURL()}{setURL()}} {\footnotesize\ttfamily nothing Qore\+::\+Ftp\+Client\+::set\+URL (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{url }\end{DoxyParamCaption})} Sets the connection and login parameters based on the URL passed as an argument. Only {\ttfamily \char`\"{}ftp\char`\"{}} and {\ttfamily \char`\"{}ftps\char`\"{}} protocols (schemes) are accepted; any other protocol (scheme) will cause an exception to be thrown. \begin{DoxyParams}{Parameters} {\em url} & The URL to use for the next connection; the URL must contain at least a hostname\\ \hline \end{DoxyParams} \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{ftp.setURL(\textcolor{stringliteral}{"{}ftps://user:pass@example.com:2021"{}});} \end{DoxyCode} \end{DoxyParagraph} \begin{DoxyExceptions}{Exceptions} {\em UNSUPPORTED-\/\+PROTOCOL} & Only {\ttfamily \char`\"{}ftp\char`\"{}} and \char`\"{}ftps\char`\"{} are allowed as the protocol (scheme) in the URL \\ \hline {\em FTP-\/\+URL-\/\+ERROR} & No hostname given in the URL \\ \hline \end{DoxyExceptions} \mbox{\Hypertarget{class_qore_1_1_ftp_client_a15efd0f6d729a01eb39ca0a53a200c73}\label{class_qore_1_1_ftp_client_a15efd0f6d729a01eb39ca0a53a200c73}} \index{Qore::FtpClient@{Qore::FtpClient}!setUserName@{setUserName}} \index{setUserName@{setUserName}!Qore::FtpClient@{Qore::FtpClient}} \doxysubsubsection{\texorpdfstring{setUserName()}{setUserName()}} {\footnotesize\ttfamily nothing Qore\+::\+Ftp\+Client\+::set\+User\+Name (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{user }\end{DoxyParamCaption})} Sets the user name to use for the next connection. \begin{DoxyParams}{Parameters} {\em user} & the user name to use for the next connection\\ \hline \end{DoxyParams} \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{ftp.setUserName(\textcolor{stringliteral}{"{}ftp"{}});} \end{DoxyCode} \end{DoxyParagraph} \mbox{\Hypertarget{class_qore_1_1_ftp_client_a49a2e47cde50ae8bbcbca8721199dd16}\label{class_qore_1_1_ftp_client_a49a2e47cde50ae8bbcbca8721199dd16}} \index{Qore::FtpClient@{Qore::FtpClient}!setWarningQueue@{setWarningQueue}} \index{setWarningQueue@{setWarningQueue}!Qore::FtpClient@{Qore::FtpClient}} \doxysubsubsection{\texorpdfstring{setWarningQueue()}{setWarningQueue()}} {\footnotesize\ttfamily nothing Qore\+::\+Ftp\+Client\+::set\+Warning\+Queue (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}}}]{warning\+\_\+ms, }\item[{\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}}}]{warning\+\_\+bs, }\item[{Queue}]{queue, }\item[{auto}]{arg, }\item[{timeout}]{min\+\_\+ms = {\ttfamily 1s} }\end{DoxyParamCaption})} Sets a \mbox{\hyperlink{class_qore_1_1_thread_1_1_queue}{Queue}} object to receive socket warnings. \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{ftp.setWarningQueue(5000, 5000, queue, \textcolor{stringliteral}{"{}socket-\/1"{}});} \end{DoxyCode} \end{DoxyParagraph} \begin{DoxyParams}{Parameters} {\em warning\+\_\+ms} & the threshold in milliseconds for individual socket actions (send, receive, connect), if exceeded, a socket warning is placed on the warning queue with the following keys\+: \begin{DoxyItemize} \item {\ttfamily \char`\"{}type\char`\"{}}\+: a string with the constant value {\ttfamily \char`\"{}\+SOCKET-\/\+OPERATION-\/\+WARNING\char`\"{}} \item {\ttfamily \char`\"{}operation\char`\"{}}\+: a string giving the operation that caused the warning (ex\+: {\ttfamily \char`\"{}connect\char`\"{}}) \item {\ttfamily \char`\"{}us\char`\"{}}\+: an integer giving the number of microseconds for the operation \item {\ttfamily \char`\"{}timeout\char`\"{}}\+: an integer giving the warning threshold in microseconds \item {\ttfamily \char`\"{}arg\char`\"{}}\+: if any {\ttfamily \char`\"{}arg\char`\"{}} argument is passed to the \mbox{\hyperlink{class_qore_1_1_ftp_client_a49a2e47cde50ae8bbcbca8721199dd16}{Ftp\+Client\+::set\+Warning\+Queue()}} method, it will be included in the warning hash here \end{DoxyItemize}\\ \hline {\em warning\+\_\+bs} & value in bytes per second; if any call has performance below this threshold, a socket warning is placed on the warning queue with the following keys\+: \begin{DoxyItemize} \item {\ttfamily \char`\"{}type\char`\"{}}\+: a string with the constant value {\ttfamily \char`\"{}\+SOCKET-\/\+THROUGHPUT-\/\+WARNING\char`\"{}} \item {\ttfamily \char`\"{}dir\char`\"{}}\+: either {\ttfamily \char`\"{}send\char`\"{}} or {\ttfamily \char`\"{}recv\char`\"{}} depending on the direction of the data flow \item {\ttfamily \char`\"{}bytes\char`\"{}}\+: the amount of bytes sent \item {\ttfamily \char`\"{}us\char`\"{}}\+: an integer giving the number of microseconds for the operation \item {\ttfamily \char`\"{}bytes\+\_\+sec\char`\"{}}\+: a float giving the transfer speed in bytes per second \item {\ttfamily \char`\"{}threshold\char`\"{}}\+: an integer giving the warning threshold in bytes per second \item {\ttfamily \char`\"{}arg\char`\"{}}\+: if any {\ttfamily \char`\"{}arg\char`\"{}} argument is passed to the \mbox{\hyperlink{class_qore_1_1_ftp_client_a49a2e47cde50ae8bbcbca8721199dd16}{Ftp\+Client\+::set\+Warning\+Queue()}} method, it will be included in the warning hash here \end{DoxyItemize}\\ \hline {\em queue} & the \mbox{\hyperlink{class_qore_1_1_thread_1_1_queue}{Queue}} object to receive warning events \\ \hline {\em arg} & an optional argument to be placed in the {\ttfamily \char`\"{}arg\char`\"{}} key in each warning hash (could be used to identify the socket for example) \\ \hline {\em min\+\_\+ms} & the minimum transfer time with a resolution of milliseconds for a transfer to be eligible for triggering a warning; transfers that take less than this period of time are not eligible for raising a warning\\ \hline \end{DoxyParams} \begin{DoxyExceptions}{Exceptions} {\em QUEUE-\/\+ERROR} & the Queue passed has a maximum size set \\ \hline {\em SOCKET-\/\+SETWARNINGQUEUE-\/\+ERROR} & at least one of {\itshape warning\+\_\+ms} and {\itshape warning\+\_\+bs} must be $>$ 0\\ \hline \end{DoxyExceptions} \begin{DoxySeeAlso}{See also} \mbox{\hyperlink{class_qore_1_1_ftp_client_a3c4ed4f609453368ba483ead948d8cf9}{Ftp\+Client\+::clear\+Warning\+Queue()}} \end{DoxySeeAlso} \begin{DoxySince}{Since} \begin{DoxyItemize} \item Qore 0.\+8.\+9 \item Qore 0.\+8.\+12 the minimum threshold for a warning is a transfer of at least 1024 bytes, smaller transfers will not result in a warning \end{DoxyItemize} \end{DoxySince} \mbox{\Hypertarget{class_qore_1_1_ftp_client_a7c9034e745129d08ee0eacf554616232}\label{class_qore_1_1_ftp_client_a7c9034e745129d08ee0eacf554616232}} \index{Qore::FtpClient@{Qore::FtpClient}!verifyPeerCertificate@{verifyPeerCertificate}} \index{verifyPeerCertificate@{verifyPeerCertificate}!Qore::FtpClient@{Qore::FtpClient}} \doxysubsubsection{\texorpdfstring{verifyPeerCertificate()}{verifyPeerCertificate()}} {\footnotesize\ttfamily \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::\+Ftp\+Client\+::verify\+Peer\+Certificate (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})} Returns a string code giving the result of verifying the remote certificate or \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} if an encrypted connection is not established. \begin{DoxyReturn}{Returns} A string code giving the result of verifying the peer\textquotesingle{}s certificate or \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} if a secure connection has not been established. The possible values are found in the keys of the \mbox{\hyperlink{group__x509__verification__constants_ga0ebd0784741e7d3521e972da7f294aba}{X509\+\_\+\+Verification\+Reasons}} hash constant. This hash can also be used to generate a textual description of the verification result. \end{DoxyReturn} \begin{DoxyParagraph}{Code Flags\+:} \mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}} \end{DoxyParagraph} \begin{DoxyParagraph}{Example\+:} \begin{DoxyCode}{0} \DoxyCodeLine{\textcolor{keywordflow}{if} (ftp.isSecure() \&\& (*string str = ftp.verifyPeerCertificate())) \{} \DoxyCodeLine{ \mbox{\hyperlink{group__string__functions_ga32070517a9f8a70a32ef48f83a6f128e}{printf}}(\textcolor{stringliteral}{"{}certificate: \%s: \%s\(\backslash\)n"{}}, str, X509\_VerificationReasons\{str\});} \end{DoxyCode} \end{DoxyParagraph}