\hypertarget{class_qore_1_1_ftp_client}{}\section{Qore\+:\+:Ftp\+Client Class Reference}
\label{class_qore_1_1_ftp_client}\index{Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}}


The \hyperlink{class_qore_1_1_ftp_client}{Ftp\+Client} class allows Qore code to communicate with F\+TP servers with the F\+TP and F\+T\+PS protocols.  


\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{class_qore_1_1_ftp_client_a1732a34fe1f8349fc05ef113b3c5af08}{clear\+Stats} ()
\begin{DoxyCompactList}\small\item\em Clears performance statistics. \end{DoxyCompactList}\item 
nothing \hyperlink{class_qore_1_1_ftp_client_a3c4ed4f609453368ba483ead948d8cf9}{clear\+Warning\+Queue} ()
\begin{DoxyCompactList}\small\item\em Removes any warning \hyperlink{class_qore_1_1_thread_1_1_queue}{Queue} object from the \hyperlink{class_qore_1_1_socket}{Socket}. \end{DoxyCompactList}\item 
nothing \hyperlink{class_qore_1_1_ftp_client_aef811b62489b3f15a600acb662494b83}{connect} ()
\begin{DoxyCompactList}\small\item\em Connects to the F\+TP server and attempts a login; if any errors occur, an exception is thrown. \end{DoxyCompactList}\item 
\hyperlink{class_qore_1_1_ftp_client_aff2f101e24bfe52cf2a974aad462086a}{constructor} ()
\begin{DoxyCompactList}\small\item\em Creates an empty \hyperlink{class_qore_1_1_ftp_client}{Ftp\+Client} object. \end{DoxyCompactList}\item 
\hyperlink{class_qore_1_1_ftp_client_a3cf48b0ab77ae7744476aa0f642dc363}{constructor} (\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} url)
\begin{DoxyCompactList}\small\item\em Creates an \hyperlink{class_qore_1_1_ftp_client}{Ftp\+Client} object and initializes it with a U\+RL. \end{DoxyCompactList}\item 
\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 \hyperlink{class_qore_1_1_ftp_client_af98c09ee337da6b7651c6d02fb207ed0}{cwd} (\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 \hyperlink{class_qore_1_1_ftp_client_aaa29460512ce4c1630aef23ce645bee6}{del} (\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} remote\+\_\+path)
\begin{DoxyCompactList}\small\item\em Deletes a file from the F\+TP server; if any errors occur, an exception is thrown. \end{DoxyCompactList}\item 
\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 \hyperlink{class_qore_1_1_ftp_client_a7b4cd4c149f4330651e5590b5beddc27}{disconnect} ()
\begin{DoxyCompactList}\small\item\em Disconnects from an F\+TP server. \end{DoxyCompactList}\item 
nothing \hyperlink{class_qore_1_1_ftp_client_a2b06a66db173df6bac61b1af48c7a11c}{get} (\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} remote\+\_\+path, \+\_\+\+\_\+7\+\_\+ \hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} local\+\_\+path)
\begin{DoxyCompactList}\small\item\em Gets a file from the F\+TP server and stores it on the local filesystem; if any errors occur, an exception is thrown. \end{DoxyCompactList}\item 
nothing \hyperlink{class_qore_1_1_ftp_client_a9d3b68c1dd8f2cf65e30435f9fc3e2dc}{get} (\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} remote\+\_\+path, \hyperlink{class_qore_1_1_output_stream}{Qore\+::\+Output\+Stream} os)
\begin{DoxyCompactList}\small\item\em Gets a file from the F\+TP server and writes it to an \hyperlink{class_qore_1_1_output_stream}{Output\+Stream}; if any errors occur, an exception is thrown. \end{DoxyCompactList}\item 
\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary} \hyperlink{class_qore_1_1_ftp_client_a6884aa57e8750c09e029fb919a31b6dd}{get\+As\+Binary} (\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} remote\+\_\+path)
\begin{DoxyCompactList}\small\item\em Gets a file from the F\+TP server and returns it as a binary. \end{DoxyCompactList}\item 
\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} \hyperlink{class_qore_1_1_ftp_client_a8de351f6d21f428f4cd39d28a8140db3}{get\+As\+String} (\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} remote\+\_\+path)
\begin{DoxyCompactList}\small\item\em Gets a file from the F\+TP server and returns it as a string. \end{DoxyCompactList}\item 
\hyperlink{group__type__conversion__functions_ga0231dbb472dd230310af7c7c34f56e92}{hash}$<$ auto $>$ \hyperlink{class_qore_1_1_ftp_client_ab07b745d71fb0d9be7860fd41c9450c8}{get\+Control\+Peer\+Info} (bool host\+\_\+lookup=\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 
\hyperlink{group__type__conversion__functions_ga0231dbb472dd230310af7c7c34f56e92}{hash}$<$ auto $>$ \hyperlink{class_qore_1_1_ftp_client_aa9bd9f5c986f891fa1e2021d426c0969}{get\+Control\+Socket\+Info} (bool host\+\_\+lookup=\hyperlink{group__boolean__constants_ga3ba2df91713a6249449347131ea526c3}{True})
\begin{DoxyCompactList}\small\item\em Returns information about the local control socket as a hash. \end{DoxyCompactList}\item 
\hyperlink{group__type__conversion__functions_ga0231dbb472dd230310af7c7c34f56e92}{hash}$<$ auto $>$ \hyperlink{class_qore_1_1_ftp_client_a4655d94c5f3a25d14098b65c21755d31}{get\+Data\+Peer\+Info} (bool host\+\_\+lookup=\hyperlink{group__boolean__constants_ga3ba2df91713a6249449347131ea526c3}{True})
\begin{DoxyCompactList}\small\item\em Returns information about the remote data socket as a hash. \end{DoxyCompactList}\item 
\hyperlink{group__type__conversion__functions_ga0231dbb472dd230310af7c7c34f56e92}{hash}$<$ auto $>$ \hyperlink{class_qore_1_1_ftp_client_a9c91cf56b957986b28ae36db98466d0b}{get\+Data\+Socket\+Info} (bool host\+\_\+lookup=\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\+\_\+ \hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} \hyperlink{class_qore_1_1_ftp_client_af7aca96e8290a8c086659b10ee5aa410}{get\+Host\+Name} ()
\begin{DoxyCompactList}\small\item\em Returns the current hostname value or \hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG} if none is set. \end{DoxyCompactList}\item 
\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} \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 
\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int} \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\+\_\+ \hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} \hyperlink{class_qore_1_1_ftp_client_ae1c299c9e3d8b5cc965d1fd61d588823}{get\+Password} ()
\begin{DoxyCompactList}\small\item\em Returns the current password value or \hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG} if none is set. \end{DoxyCompactList}\item 
\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int} \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\+\_\+ \hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} \hyperlink{class_qore_1_1_ftp_client_adb91e4ad74569ef20a4b53e507bf0ad9}{get\+S\+S\+L\+Cipher\+Name} ()
\begin{DoxyCompactList}\small\item\em Returns the name of the cipher for an encrypted connection or \hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG} if an encrypted connection is not established. \end{DoxyCompactList}\item 
\+\_\+\+\_\+7\+\_\+ \hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} \hyperlink{class_qore_1_1_ftp_client_a44b230cef51f054d0bc89a7ebb237b4b}{get\+S\+S\+L\+Cipher\+Version} ()
\begin{DoxyCompactList}\small\item\em Returns the version of the cipher for an encrypted connection or \hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG} if an encrypted connection is not established. \end{DoxyCompactList}\item 
\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int} \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 
\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} \hyperlink{class_qore_1_1_ftp_client_a3becc28023f121a7aa3c40a4c396a602}{get\+U\+RL} ()
\begin{DoxyCompactList}\small\item\em Retrieves the current connection U\+RL string for this object. \end{DoxyCompactList}\item 
\hyperlink{group__type__conversion__functions_ga0231dbb472dd230310af7c7c34f56e92}{hash} \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\+\_\+ \hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} \hyperlink{class_qore_1_1_ftp_client_a4ae45142fe54a12f9548154b8f8e2c1e}{get\+User\+Name} ()
\begin{DoxyCompactList}\small\item\em Returns the current username value or \hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG} if none is set. \end{DoxyCompactList}\item 
bool \hyperlink{class_qore_1_1_ftp_client_a3025f2ac95d03d4e744de82b5a26ad9a}{is\+Data\+Secure} ()
\begin{DoxyCompactList}\small\item\em Returns \hyperlink{group__boolean__constants_ga3ba2df91713a6249449347131ea526c3}{True} if the data connections are secure T\+L\+S/\+S\+SL connections, \hyperlink{group__boolean__constants_ga9da2b9a8003cd3788e48305f8a00540f}{False} if not. \end{DoxyCompactList}\item 
bool \hyperlink{class_qore_1_1_ftp_client_ad6b30ff57e39fc5aa580d20b135195d9}{is\+Secure} ()
\begin{DoxyCompactList}\small\item\em Returns \hyperlink{group__boolean__constants_ga3ba2df91713a6249449347131ea526c3}{True} if the control connection is a secure T\+L\+S/\+S\+SL connection, \hyperlink{group__boolean__constants_ga9da2b9a8003cd3788e48305f8a00540f}{False} if not. \end{DoxyCompactList}\item 
\+\_\+\+\_\+7\+\_\+ \hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} \hyperlink{class_qore_1_1_ftp_client_a21409b36294103779bba4f872e6ff8aa}{list} ()
\begin{DoxyCompactList}\small\item\em Returns a list of files from the F\+TP server in the server\textquotesingle{}s long format in the current working directory or \hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG} if the path cannot be found. \end{DoxyCompactList}\item 
\+\_\+\+\_\+7\+\_\+ \hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} \hyperlink{class_qore_1_1_ftp_client_ad987cf2d506bb966f7886425abd8d23c}{list} (\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} path)
\begin{DoxyCompactList}\small\item\em Returns a list of files from the F\+TP server in the server\textquotesingle{}s long format for the given path or \hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG} if the path cannot be found. \end{DoxyCompactList}\item 
nothing \hyperlink{class_qore_1_1_ftp_client_a8d0ae5b88c272e4ae0f5113c5ae0d835}{mkdir} (\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} remote\+\_\+path)
\begin{DoxyCompactList}\small\item\em Creates a directory on the F\+TP server; if any errors occur, an exception is thrown. \end{DoxyCompactList}\item 
\+\_\+\+\_\+7\+\_\+ \hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} \hyperlink{class_qore_1_1_ftp_client_aa4905e4a78ade8053e709f094a7ed705}{nlst} ()
\begin{DoxyCompactList}\small\item\em Returns a list of file names from the F\+TP server in the current working directory or \hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG} if the path cannot be found. \end{DoxyCompactList}\item 
\+\_\+\+\_\+7\+\_\+ \hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} \hyperlink{class_qore_1_1_ftp_client_a734bc75154487b7344b36f2d2eed84ae}{nlst} (\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} path)
\begin{DoxyCompactList}\small\item\em Returns a list of file names from the F\+TP server for the given path or \hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG} if the path cannot be found. \end{DoxyCompactList}\item 
nothing \hyperlink{class_qore_1_1_ftp_client_a835c52e32ee089773d48574f297e7965}{put} (\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} local\+\_\+path, \+\_\+\+\_\+7\+\_\+ \hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} remote\+\_\+path)
\begin{DoxyCompactList}\small\item\em Transfers a local file to the F\+TP server; if any errors occur, an exception is thrown. \end{DoxyCompactList}\item 
nothing \hyperlink{class_qore_1_1_ftp_client_ac44baa2151f3a892bc96abe6d0e54714}{put} (\hyperlink{class_qore_1_1_input_stream}{Qore\+::\+Input\+Stream} is, \hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} remote\+\_\+path)
\begin{DoxyCompactList}\small\item\em Transfers the content of an \hyperlink{class_qore_1_1_input_stream}{Input\+Stream} to the F\+TP server; if any errors occur, an exception is thrown. \end{DoxyCompactList}\item 
nothing \hyperlink{class_qore_1_1_ftp_client_aeb0580e5a740c437a18329ee6fab03f8}{put\+Data} (\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} data, \hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} remote\+\_\+path)
\begin{DoxyCompactList}\small\item\em Transfers string data to the F\+TP server and saves it as a file on the remote machine; if any errors occur, an exception is thrown. \end{DoxyCompactList}\item 
nothing \hyperlink{class_qore_1_1_ftp_client_a3434ced4c5c1c62a03e7722abcb24cfc}{put\+Data} (\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary} data, \hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} remote\+\_\+path)
\begin{DoxyCompactList}\small\item\em Transfers binary data to the F\+TP server and saves it as a file on the remote machine; if any errors occur, an exception is thrown. \end{DoxyCompactList}\item 
\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} \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 \hyperlink{class_qore_1_1_ftp_client_ac860bd11c765ed26e9f94bdc359c0d9e}{rename} (\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} from, \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 \hyperlink{class_qore_1_1_ftp_client_ac375463bf297a16943a1cd63d3be3068}{rmdir} (\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} remote\+\_\+path)
\begin{DoxyCompactList}\small\item\em Removes a directory on the remote F\+TP server; if any errors occur, an exception is thrown. \end{DoxyCompactList}\item 
nothing \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 \hyperlink{class_qore_1_1_ftp_client}{Ftp\+Client} object so that \hyperlink{event_handling}{I/O events} are no longer captured on the object on the control connection. \end{DoxyCompactList}\item 
nothing \hyperlink{class_qore_1_1_ftp_client_ab3d6a350e07f923ada80f46f3078c109}{set\+Control\+Event\+Queue} (\hyperlink{class_qore_1_1_thread_1_1_queue}{Qore\+::\+Thread\+::\+Queue} queue)
\begin{DoxyCompactList}\small\item\em Sets a Queue object to receive \hyperlink{class_qore_1_1_ftp_client}{Ftp\+Client} and \hyperlink{class_qore_1_1_socket}{Socket} events on the control connection. \end{DoxyCompactList}\item 
nothing \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 \hyperlink{class_qore_1_1_ftp_client}{Ftp\+Client} object so that \hyperlink{event_handling}{I/O events} are no longer captured on the object on the data connection. \end{DoxyCompactList}\item 
nothing \hyperlink{class_qore_1_1_ftp_client_a46177b721d9b98eda4d9769fe85f543f}{set\+Data\+Event\+Queue} (\hyperlink{class_qore_1_1_thread_1_1_queue}{Qore\+::\+Thread\+::\+Queue} queue)
\begin{DoxyCompactList}\small\item\em Sets a Queue object to receive \hyperlink{class_qore_1_1_ftp_client}{Ftp\+Client} and \hyperlink{class_qore_1_1_socket}{Socket} events on the data connection. \end{DoxyCompactList}\item 
nothing \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 \hyperlink{class_qore_1_1_ftp_client}{Ftp\+Client} object so that \hyperlink{event_handling}{I/O events} are no longer captured on the object on either the data or control connections. \end{DoxyCompactList}\item 
nothing \hyperlink{class_qore_1_1_ftp_client_a5f72b24438d935667605f619c54789b3}{set\+Event\+Queue} (\hyperlink{class_qore_1_1_thread_1_1_queue}{Qore\+::\+Thread\+::\+Queue} queue)
\begin{DoxyCompactList}\small\item\em Sets a Queue object to receive \hyperlink{class_qore_1_1_ftp_client}{Ftp\+Client} and \hyperlink{class_qore_1_1_socket}{Socket} events on both the data and control connections. \end{DoxyCompactList}\item 
nothing \hyperlink{class_qore_1_1_ftp_client_ab32919fb108c2ccfd9b7c7f019c643b2}{set\+Host\+Name} (\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 \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 \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 \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 E\+P\+SV}, {\ttfamily P\+A\+SV}, and {\ttfamily P\+O\+RT} modes, in that order. \end{DoxyCompactList}\item 
nothing \hyperlink{class_qore_1_1_ftp_client_a9dd1291cef32804febcdf577ac537424}{set\+Mode\+E\+P\+SV} ()
\begin{DoxyCompactList}\small\item\em Sets the object to only try to make data connections using {\ttfamily E\+P\+SV} (\href{http://tools.ietf.org/html/rfc2428}{\tt R\+F\+C-\/2428} extended passive) mode. \end{DoxyCompactList}\item 
nothing \hyperlink{class_qore_1_1_ftp_client_a1c622625f391e801b4af7bf802c577cf}{set\+Mode\+P\+A\+SV} ()
\begin{DoxyCompactList}\small\item\em Sets the object to only try to make data connections using {\ttfamily P\+A\+SV} (\href{http://tools.ietf.org/html/rfc959}{\tt R\+F\+C-\/959} passive) mode. \end{DoxyCompactList}\item 
nothing \hyperlink{class_qore_1_1_ftp_client_ae66f4b1496453fb2f101c86c868742f4}{set\+Mode\+P\+O\+RT} ()
\begin{DoxyCompactList}\small\item\em Sets the object to only try to make data connections using {\ttfamily P\+O\+RT} mode. \end{DoxyCompactList}\item 
nothing \hyperlink{class_qore_1_1_ftp_client_a1ced03072c695abf25df4d419b64dfa0}{set\+Network\+Family} (\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 I\+Pv4 or I\+Pv6 connections. \end{DoxyCompactList}\item 
nothing \hyperlink{class_qore_1_1_ftp_client_afbbcc2baf05d46c3f96fa2d2f8546d86}{set\+Password} (\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 \hyperlink{class_qore_1_1_ftp_client_aab84947c2e5f474714f0456163954d60}{set\+Port} (\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 F\+TP protocol default is 21) \end{DoxyCompactList}\item 
nothing \hyperlink{class_qore_1_1_ftp_client_a093c4791c32406da7f141f68fb0ced9b}{set\+Secure} (bool secure=\hyperlink{group__boolean__constants_ga3ba2df91713a6249449347131ea526c3}{True})
\begin{DoxyCompactList}\small\item\em Make an F\+T\+PS connection to the server on the next connect if the argument is \hyperlink{group__boolean__constants_ga3ba2df91713a6249449347131ea526c3}{True}. \end{DoxyCompactList}\item 
\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 \hyperlink{class_qore_1_1_ftp_client_a592c70037c05cbe3e89172c2d8c4883a}{set\+U\+RL} (\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} url)
\begin{DoxyCompactList}\small\item\em Sets the connection and login parameters based on the U\+RL passed as an argument. \end{DoxyCompactList}\item 
nothing \hyperlink{class_qore_1_1_ftp_client_a15efd0f6d729a01eb39ca0a53a200c73}{set\+User\+Name} (\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 \hyperlink{class_qore_1_1_ftp_client_a49a2e47cde50ae8bbcbca8721199dd16}{set\+Warning\+Queue} (\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int} warning\+\_\+ms, \hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int} warning\+\_\+bs, Queue queue, auto arg, timeout min\+\_\+ms=1s)
\begin{DoxyCompactList}\small\item\em Sets a \hyperlink{class_qore_1_1_thread_1_1_queue}{Queue} object to receive socket warnings. \end{DoxyCompactList}\item 
\+\_\+\+\_\+7\+\_\+ \hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} \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 \hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG} if an encrypted connection is not established. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
The \hyperlink{class_qore_1_1_ftp_client}{Ftp\+Client} class allows Qore code to communicate with F\+TP servers with the F\+TP and F\+T\+PS protocols. 

\begin{DoxyParagraph}{Restrictions\+:}
\hyperlink{group__parse__options_ga20400e83c6271a294a48b15a8f952efa}{Qore\+::\+P\+O\+\_\+\+N\+O\+\_\+\+N\+E\+T\+W\+O\+RK}
\end{DoxyParagraph}
The constructor takes an optional U\+RL 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 U\+RL 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 U\+RL, it is ignored. See the following table for default U\+RL parameters.

{\bfseries \hyperlink{class_qore_1_1_ftp_client_aff2f101e24bfe52cf2a974aad462086a}{Ftp\+Client\+::constructor()} Default U\+RL 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 U\+RL (at least the hostname) has been set, any method requiring a connection will make an implicit call to \hyperlink{class_qore_1_1_ftp_client_aef811b62489b3f15a600acb662494b83}{Ftp\+Client\+::connect()} to attempt to connect and login to the F\+TP server before executing the method.

Objects of this class are capable of making encrypted F\+T\+PS connections according to \href{http://tools.ietf.org/html/rfc4217}{\tt R\+F\+C-\/4217}. T\+L\+S/\+S\+SL encrypted control and data connection will be attempted if the protocol is set to {\ttfamily \char`\"{}ftps\char`\"{}} or the \hyperlink{class_qore_1_1_ftp_client_a093c4791c32406da7f141f68fb0ced9b}{Ftp\+Client\+::set\+Secure()} method is called before connecting.

Note that {\ttfamily \char`\"{}sftp\char`\"{}}, or F\+TP over ssh, is not supported with this class; F\+T\+PS is an extension of the F\+TP protocol to allow for secure connections; while {\ttfamily \char`\"{}sftp\char`\"{}} is F\+TP 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 E\+P\+SV} (Extended Passive Mode)
\item {\ttfamily P\+A\+SV} (Passive Mode)
\item {\ttfamily P\+O\+RT} (Port mode)
\end{DoxyItemize}

If the F\+TP 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 \hyperlink{class_qore_1_1_ftp_client_a9dd1291cef32804febcdf577ac537424}{Ftp\+Client\+::set\+Mode\+E\+P\+S\+V()}, \hyperlink{class_qore_1_1_ftp_client_a1c622625f391e801b4af7bf802c577cf}{Ftp\+Client\+::set\+Mode\+P\+A\+S\+V()}, and \hyperlink{class_qore_1_1_ftp_client_ae66f4b1496453fb2f101c86c868742f4}{Ftp\+Client\+::set\+Mode\+P\+O\+R\+T()} methods.

This class supports posting network events to a Queue, either events on the control or data channels or both can be monitored. See \hyperlink{event_handling}{I/O Event Handling} for more information.

The events raised by this object are listed in the following table\+:

{\bfseries \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}
\hyperlink{event_handling_EVENT_FTP_SEND_MESSAGE}{E\+V\+E\+N\+T\+\_\+\+F\+T\+P\+\_\+\+S\+E\+N\+D\+\_\+\+M\+E\+S\+S\+A\+GE} &{\ttfamily 9}  &Raised immediately before an F\+TP control message is sent  \\\cline{1-3}
\hyperlink{event_handling_EVENT_FTP_MESSAGE_RECEIVED}{E\+V\+E\+N\+T\+\_\+\+F\+T\+P\+\_\+\+M\+E\+S\+S\+A\+G\+E\+\_\+\+R\+E\+C\+E\+I\+V\+ED} &{\ttfamily 10}  &Raised when an F\+TP reply is received on the control channel  \\\cline{1-3}
\end{longtabu}
\hypertarget{class_qore_1_1_ftp_client_ftpclient_timeouts}{}\subsection{Ftp\+Client Timeouts}\label{class_qore_1_1_ftp_client_ftpclient_timeouts}
\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 \hyperlink{class_qore_1_1_ftp_client_ac53196ba6703b4dab58cd33cd007bf32}{Ftp\+Client\+:\+:get\+Timeout()}
\item \hyperlink{class_qore_1_1_ftp_client_a024e4f784381a2ff516e204e7bd9f383}{Ftp\+Client\+:\+:set\+Timeout()}
\end{DoxyItemize}

\begin{DoxyNote}{Note}
This class is not available with the \hyperlink{group__parse__options_ga20400e83c6271a294a48b15a8f952efa}{P\+O\+\_\+\+N\+O\+\_\+\+N\+E\+T\+W\+O\+RK} parse option. 
\end{DoxyNote}


\subsection{Member Function Documentation}
\mbox{\Hypertarget{class_qore_1_1_ftp_client_a1732a34fe1f8349fc05ef113b3c5af08}\label{class_qore_1_1_ftp_client_a1732a34fe1f8349fc05ef113b3c5af08}} 
\index{Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}!clear\+Stats@{clear\+Stats}}
\index{clear\+Stats@{clear\+Stats}!Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}}
\subsubsection{\texorpdfstring{clear\+Stats()}{clearStats()}}
{\footnotesize\ttfamily Qore\+::\+Ftp\+Client\+::clear\+Stats (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Clears performance statistics. 

\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
ftp.clearStats();
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySince}{Since}
Qore 0.\+8.\+9
\end{DoxySince}
\begin{DoxySeeAlso}{See also}
\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\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}!clear\+Warning\+Queue@{clear\+Warning\+Queue}}
\index{clear\+Warning\+Queue@{clear\+Warning\+Queue}!Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}}
\subsubsection{\texorpdfstring{clear\+Warning\+Queue()}{clearWarningQueue()}}
{\footnotesize\ttfamily nothing Qore\+::\+Ftp\+Client\+::clear\+Warning\+Queue (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Removes any warning \hyperlink{class_qore_1_1_thread_1_1_queue}{Queue} object from the \hyperlink{class_qore_1_1_socket}{Socket}. 

\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
ftp.clearWarningQueue();
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}
\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\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}!connect@{connect}}
\index{connect@{connect}!Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}}
\subsubsection{\texorpdfstring{connect()}{connect()}}
{\footnotesize\ttfamily nothing Qore\+::\+Ftp\+Client\+::connect (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Connects to the F\+TP 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 F\+TP servers.

Connection parameters are set in the constructor or in the Ftp\+Client\+::set$\ast$() methods

\begin{DoxyParagraph}{Events\+:}
\hyperlink{event_handling_EVENT_CONNECTING}{E\+V\+E\+N\+T\+\_\+\+C\+O\+N\+N\+E\+C\+T\+I\+NG}, \hyperlink{event_handling_EVENT_CONNECTED}{E\+V\+E\+N\+T\+\_\+\+C\+O\+N\+N\+E\+C\+T\+ED}, \hyperlink{event_handling_EVENT_HOSTNAME_LOOKUP}{E\+V\+E\+N\+T\+\_\+\+H\+O\+S\+T\+N\+A\+M\+E\+\_\+\+L\+O\+O\+K\+UP}, \hyperlink{event_handling_EVENT_HOSTNAME_RESOLVED}{E\+V\+E\+N\+T\+\_\+\+H\+O\+S\+T\+N\+A\+M\+E\+\_\+\+R\+E\+S\+O\+L\+V\+ED}, \hyperlink{event_handling_EVENT_START_SSL}{E\+V\+E\+N\+T\+\_\+\+S\+T\+A\+R\+T\+\_\+\+S\+SL}, \hyperlink{event_handling_EVENT_SSL_ESTABLISHED}{E\+V\+E\+N\+T\+\_\+\+S\+S\+L\+\_\+\+E\+S\+T\+A\+B\+L\+I\+S\+H\+ED}, \hyperlink{event_handling_EVENT_FTP_SEND_MESSAGE}{E\+V\+E\+N\+T\+\_\+\+F\+T\+P\+\_\+\+S\+E\+N\+D\+\_\+\+M\+E\+S\+S\+A\+GE}, \hyperlink{event_handling_EVENT_FTP_MESSAGE_RECEIVED}{E\+V\+E\+N\+T\+\_\+\+F\+T\+P\+\_\+\+M\+E\+S\+S\+A\+G\+E\+\_\+\+R\+E\+C\+E\+I\+V\+ED}, \hyperlink{event_handling_EVENT_PACKET_READ}{E\+V\+E\+N\+T\+\_\+\+P\+A\+C\+K\+E\+T\+\_\+\+R\+E\+AD}, \hyperlink{event_handling_EVENT_PACKET_SENT}{E\+V\+E\+N\+T\+\_\+\+P\+A\+C\+K\+E\+T\+\_\+\+S\+E\+NT}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
ftp.connect();
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em F\+T\+P-\/\+R\+E\+S\+P\+O\+N\+S\+E-\/\+E\+R\+R\+OR} & Invalid response received from F\+TP server \\
\hline
{\em S\+O\+C\+K\+E\+T-\/\+C\+O\+N\+N\+E\+C\+T-\/\+E\+R\+R\+OR} & Cannot establish socket connection to F\+TP server \\
\hline
{\em F\+T\+P-\/\+C\+O\+N\+N\+E\+C\+T-\/\+E\+R\+R\+OR} & no hostname set, F\+TP server reported an error, etc \\
\hline
{\em F\+T\+P-\/\+L\+O\+G\+I\+N-\/\+E\+R\+R\+OR} & Login denied by F\+TP server \\
\hline
\end{DoxyExceptions}
\mbox{\Hypertarget{class_qore_1_1_ftp_client_aff2f101e24bfe52cf2a974aad462086a}\label{class_qore_1_1_ftp_client_aff2f101e24bfe52cf2a974aad462086a}} 
\index{Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}!constructor@{constructor}}
\index{constructor@{constructor}!Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}}
\subsubsection{\texorpdfstring{constructor()}{constructor()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily Qore\+::\+Ftp\+Client\+::constructor (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Creates an empty \hyperlink{class_qore_1_1_ftp_client}{Ftp\+Client} object. 

\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
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\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}!constructor@{constructor}}
\index{constructor@{constructor}!Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}}
\subsubsection{\texorpdfstring{constructor()}{constructor()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily Qore\+::\+Ftp\+Client\+::constructor (\begin{DoxyParamCaption}\item[{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}]{url }\end{DoxyParamCaption})}



Creates an \hyperlink{class_qore_1_1_ftp_client}{Ftp\+Client} object and initializes it with a U\+RL. 

It accepts one argument that will set the U\+RL for the F\+TP connection; the path is ignored in the U\+RL, 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}{\tt R\+F\+C-\/4217} when the first connection is established.


\begin{DoxyParams}{Parameters}
{\em url} & The U\+RL of the server to connect to; must have at least a hostname\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
FtpClient ftp(\textcolor{stringliteral}{"ftp://user:pass@example.com:2021"});
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em U\+N\+S\+U\+P\+P\+O\+R\+T\+E\+D-\/\+P\+R\+O\+T\+O\+C\+OL} & Only {\ttfamily \char`\"{}ftp\char`\"{}} or {\ttfamily \char`\"{}ftps\char`\"{}} are allowed as the protocol in the U\+RL \\
\hline
{\em F\+T\+P-\/\+U\+R\+L-\/\+E\+R\+R\+OR} & No hostname given in the U\+RL \\
\hline
\end{DoxyExceptions}
\mbox{\Hypertarget{class_qore_1_1_ftp_client_a5eb696dad8f1f62841533b5fefda127a}\label{class_qore_1_1_ftp_client_a5eb696dad8f1f62841533b5fefda127a}} 
\index{Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}!copy@{copy}}
\index{copy@{copy}!Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}}
\subsubsection{\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 F\+T\+P\+C\+L\+I\+E\+N\+T-\/\+C\+O\+P\+Y-\/\+E\+R\+R\+OR} & \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\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}!cwd@{cwd}}
\index{cwd@{cwd}!Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}}
\subsubsection{\texorpdfstring{cwd()}{cwd()}}
{\footnotesize\ttfamily nothing Qore\+::\+Ftp\+Client\+::cwd (\begin{DoxyParamCaption}\item[{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}]{path }\end{DoxyParamCaption})}



Changes the current working directory on the server. 

\begin{DoxyParagraph}{Events\+:}
\hyperlink{event_handling_EVENT_FTP_SEND_MESSAGE}{E\+V\+E\+N\+T\+\_\+\+F\+T\+P\+\_\+\+S\+E\+N\+D\+\_\+\+M\+E\+S\+S\+A\+GE}, \hyperlink{event_handling_EVENT_FTP_MESSAGE_RECEIVED}{E\+V\+E\+N\+T\+\_\+\+F\+T\+P\+\_\+\+M\+E\+S\+S\+A\+G\+E\+\_\+\+R\+E\+C\+E\+I\+V\+ED}, \hyperlink{event_handling_EVENT_PACKET_READ}{E\+V\+E\+N\+T\+\_\+\+P\+A\+C\+K\+E\+T\+\_\+\+R\+E\+AD}, \hyperlink{event_handling_EVENT_PACKET_SENT}{E\+V\+E\+N\+T\+\_\+\+P\+A\+C\+K\+E\+T\+\_\+\+S\+E\+NT}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
ftp.cwd(\textcolor{stringliteral}{"/foo/bar"});
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em F\+T\+P-\/\+R\+E\+C\+E\+I\+V\+E-\/\+E\+R\+R\+OR} & Incomplete message received on control port \\
\hline
{\em F\+T\+P-\/\+C\+W\+D-\/\+E\+R\+R\+OR} & F\+TP server returned an error to the C\+WD command\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}
see \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\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}!del@{del}}
\index{del@{del}!Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}}
\subsubsection{\texorpdfstring{del()}{del()}}
{\footnotesize\ttfamily nothing Qore\+::\+Ftp\+Client\+::del (\begin{DoxyParamCaption}\item[{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}]{remote\+\_\+path }\end{DoxyParamCaption})}



Deletes a file from the F\+TP 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\+:}
\hyperlink{event_handling_EVENT_FTP_SEND_MESSAGE}{E\+V\+E\+N\+T\+\_\+\+F\+T\+P\+\_\+\+S\+E\+N\+D\+\_\+\+M\+E\+S\+S\+A\+GE}, \hyperlink{event_handling_EVENT_FTP_MESSAGE_RECEIVED}{E\+V\+E\+N\+T\+\_\+\+F\+T\+P\+\_\+\+M\+E\+S\+S\+A\+G\+E\+\_\+\+R\+E\+C\+E\+I\+V\+ED}, \hyperlink{event_handling_EVENT_PACKET_READ}{E\+V\+E\+N\+T\+\_\+\+P\+A\+C\+K\+E\+T\+\_\+\+R\+E\+AD}, \hyperlink{event_handling_EVENT_PACKET_SENT}{E\+V\+E\+N\+T\+\_\+\+P\+A\+C\+K\+E\+T\+\_\+\+S\+E\+NT}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
ftp.del(\textcolor{stringliteral}{"file-2.txt"});
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em F\+T\+P-\/\+R\+E\+C\+E\+I\+V\+E-\/\+E\+R\+R\+OR} & Incomplete message received on control port \\
\hline
{\em F\+T\+P-\/\+D\+E\+L\+E\+T\+E-\/\+E\+R\+R\+OR} & F\+TP server returned an error to the {\ttfamily D\+E\+LE} command\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}
see \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\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}!destructor@{destructor}}
\index{destructor@{destructor}!Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}}
\subsubsection{\texorpdfstring{destructor()}{destructor()}}
{\footnotesize\ttfamily Qore\+::\+Ftp\+Client\+::destructor (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Disconnects any remote connection and destroys the object. 

\begin{DoxyParagraph}{Events\+:}
\hyperlink{event_handling_EVENT_CHANNEL_CLOSED}{E\+V\+E\+N\+T\+\_\+\+C\+H\+A\+N\+N\+E\+L\+\_\+\+C\+L\+O\+S\+ED}, \hyperlink{event_handling_EVENT_DELETED}{E\+V\+E\+N\+T\+\_\+\+D\+E\+L\+E\+T\+ED}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
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\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}!disconnect@{disconnect}}
\index{disconnect@{disconnect}!Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}}
\subsubsection{\texorpdfstring{disconnect()}{disconnect()}}
{\footnotesize\ttfamily nothing Qore\+::\+Ftp\+Client\+::disconnect (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Disconnects from an F\+TP server. 

\begin{DoxyParagraph}{Events\+:}
\hyperlink{event_handling_EVENT_CHANNEL_CLOSED}{E\+V\+E\+N\+T\+\_\+\+C\+H\+A\+N\+N\+E\+L\+\_\+\+C\+L\+O\+S\+ED}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
delete ftp;
\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_ftp_client_a2b06a66db173df6bac61b1af48c7a11c}\label{class_qore_1_1_ftp_client_a2b06a66db173df6bac61b1af48c7a11c}} 
\index{Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}!get@{get}}
\index{get@{get}!Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}}
\subsubsection{\texorpdfstring{get()}{get()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily nothing Qore\+::\+Ftp\+Client\+::get (\begin{DoxyParamCaption}\item[{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}]{remote\+\_\+path,  }\item[{\+\_\+\+\_\+7\+\_\+ \hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}]{local\+\_\+path }\end{DoxyParamCaption})}



Gets a file from the F\+TP server and stores it on the local filesystem; if any errors occur, an exception is thrown. 

\begin{DoxyParagraph}{Restrictions\+:}
\hyperlink{group__parse__options_ga5e466ed886222f0b57b0a399b455be71}{Qore\+::\+P\+O\+\_\+\+N\+O\+\_\+\+F\+I\+L\+E\+S\+Y\+S\+T\+EM}
\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\+:}
\hyperlink{event_handling_EVENT_FTP_SEND_MESSAGE}{E\+V\+E\+N\+T\+\_\+\+F\+T\+P\+\_\+\+S\+E\+N\+D\+\_\+\+M\+E\+S\+S\+A\+GE}, \hyperlink{event_handling_EVENT_FTP_MESSAGE_RECEIVED}{E\+V\+E\+N\+T\+\_\+\+F\+T\+P\+\_\+\+M\+E\+S\+S\+A\+G\+E\+\_\+\+R\+E\+C\+E\+I\+V\+ED}, \hyperlink{event_handling_EVENT_PACKET_READ}{E\+V\+E\+N\+T\+\_\+\+P\+A\+C\+K\+E\+T\+\_\+\+R\+E\+AD}, \hyperlink{event_handling_EVENT_PACKET_SENT}{E\+V\+E\+N\+T\+\_\+\+P\+A\+C\+K\+E\+T\+\_\+\+S\+E\+NT}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
ftp.get(\textcolor{stringliteral}{"file.txt"}, \textcolor{stringliteral}{"/tmp/file-1.txt"});
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em F\+T\+P-\/\+R\+E\+C\+E\+I\+V\+E-\/\+E\+R\+R\+OR} & Incomplete message received on control port \\
\hline
{\em F\+T\+P-\/\+F\+I\+L\+E-\/\+O\+P\+E\+N-\/\+E\+R\+R\+OR} & Could not create the local file \\
\hline
{\em F\+T\+P-\/\+G\+E\+T-\/\+E\+R\+R\+OR} & There was an error retrieving the file\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}

\begin{DoxyItemize}
\item see \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}
\hyperlink{class_qore_1_1_ftp_client_a8de351f6d21f428f4cd39d28a8140db3}{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\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}!get@{get}}
\index{get@{get}!Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}}
\subsubsection{\texorpdfstring{get()}{get()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily nothing Qore\+::\+Ftp\+Client\+::get (\begin{DoxyParamCaption}\item[{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}]{remote\+\_\+path,  }\item[{\hyperlink{class_qore_1_1_output_stream}{Qore\+::\+Output\+Stream}}]{os }\end{DoxyParamCaption})}



Gets a file from the F\+TP server and writes it to an \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\+:}
\hyperlink{event_handling_EVENT_FTP_SEND_MESSAGE}{E\+V\+E\+N\+T\+\_\+\+F\+T\+P\+\_\+\+S\+E\+N\+D\+\_\+\+M\+E\+S\+S\+A\+GE}, \hyperlink{event_handling_EVENT_FTP_MESSAGE_RECEIVED}{E\+V\+E\+N\+T\+\_\+\+F\+T\+P\+\_\+\+M\+E\+S\+S\+A\+G\+E\+\_\+\+R\+E\+C\+E\+I\+V\+ED}, \hyperlink{event_handling_EVENT_PACKET_READ}{E\+V\+E\+N\+T\+\_\+\+P\+A\+C\+K\+E\+T\+\_\+\+R\+E\+AD}, \hyperlink{event_handling_EVENT_PACKET_SENT}{E\+V\+E\+N\+T\+\_\+\+P\+A\+C\+K\+E\+T\+\_\+\+S\+E\+NT}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
ftp.get(\textcolor{stringliteral}{"file.txt"}, new FileOutputStream(\textcolor{stringliteral}{"/tmp/file-1.txt"}));
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em F\+T\+P-\/\+R\+E\+C\+E\+I\+V\+E-\/\+E\+R\+R\+OR} & Incomplete message received on control port \\
\hline
{\em F\+T\+P-\/\+F\+I\+L\+E-\/\+O\+P\+E\+N-\/\+E\+R\+R\+OR} & Could not create the local file \\
\hline
{\em F\+T\+P-\/\+G\+E\+T-\/\+E\+R\+R\+OR} & There was an error retrieving the file\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}
see \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}
\hyperlink{class_qore_1_1_ftp_client_a8de351f6d21f428f4cd39d28a8140db3}{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\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}!get\+As\+Binary@{get\+As\+Binary}}
\index{get\+As\+Binary@{get\+As\+Binary}!Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}}
\subsubsection{\texorpdfstring{get\+As\+Binary()}{getAsBinary()}}
{\footnotesize\ttfamily \hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary} Qore\+::\+Ftp\+Client\+::get\+As\+Binary (\begin{DoxyParamCaption}\item[{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}]{remote\+\_\+path }\end{DoxyParamCaption})}



Gets a file from the F\+TP 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\+:}
\hyperlink{event_handling_EVENT_FTP_SEND_MESSAGE}{E\+V\+E\+N\+T\+\_\+\+F\+T\+P\+\_\+\+S\+E\+N\+D\+\_\+\+M\+E\+S\+S\+A\+GE}, \hyperlink{event_handling_EVENT_FTP_MESSAGE_RECEIVED}{E\+V\+E\+N\+T\+\_\+\+F\+T\+P\+\_\+\+M\+E\+S\+S\+A\+G\+E\+\_\+\+R\+E\+C\+E\+I\+V\+ED}, \hyperlink{event_handling_EVENT_PACKET_READ}{E\+V\+E\+N\+T\+\_\+\+P\+A\+C\+K\+E\+T\+\_\+\+R\+E\+AD}, \hyperlink{event_handling_EVENT_PACKET_SENT}{E\+V\+E\+N\+T\+\_\+\+P\+A\+C\+K\+E\+T\+\_\+\+S\+E\+NT}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
binary b = ftp.getAsBinary(\textcolor{stringliteral}{"file.pdf"});
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em F\+T\+P-\/\+R\+E\+C\+E\+I\+V\+E-\/\+E\+R\+R\+OR} & Incomplete message received on control port \\
\hline
{\em F\+T\+P-\/\+F\+I\+L\+E-\/\+O\+P\+E\+N-\/\+E\+R\+R\+OR} & Could not create the local file \\
\hline
{\em F\+T\+P-\/\+G\+E\+T-\/\+E\+R\+R\+OR} & There was an error retrieving the file\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}
see \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}
\hyperlink{class_qore_1_1_ftp_client_a8de351f6d21f428f4cd39d28a8140db3}{Ftp\+Client\+::get\+As\+String()} for a similar function returning the file\textquotesingle{}s contents as a \hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}; see \hyperlink{class_qore_1_1_ftp_client_a2b06a66db173df6bac61b1af48c7a11c}{Ftp\+Client\+::get()} for a function that will \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_a8de351f6d21f428f4cd39d28a8140db3}\label{class_qore_1_1_ftp_client_a8de351f6d21f428f4cd39d28a8140db3}} 
\index{Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}!get\+As\+String@{get\+As\+String}}
\index{get\+As\+String@{get\+As\+String}!Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}}
\subsubsection{\texorpdfstring{get\+As\+String()}{getAsString()}}
{\footnotesize\ttfamily \hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} Qore\+::\+Ftp\+Client\+::get\+As\+String (\begin{DoxyParamCaption}\item[{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}]{remote\+\_\+path }\end{DoxyParamCaption})}



Gets a file from the F\+TP server and returns it as a string. 


\begin{DoxyParams}{Parameters}
{\em remote\+\_\+path} & The path on the server to the file to get\\
\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\+:}
\hyperlink{event_handling_EVENT_FTP_SEND_MESSAGE}{E\+V\+E\+N\+T\+\_\+\+F\+T\+P\+\_\+\+S\+E\+N\+D\+\_\+\+M\+E\+S\+S\+A\+GE}, \hyperlink{event_handling_EVENT_FTP_MESSAGE_RECEIVED}{E\+V\+E\+N\+T\+\_\+\+F\+T\+P\+\_\+\+M\+E\+S\+S\+A\+G\+E\+\_\+\+R\+E\+C\+E\+I\+V\+ED}, \hyperlink{event_handling_EVENT_PACKET_READ}{E\+V\+E\+N\+T\+\_\+\+P\+A\+C\+K\+E\+T\+\_\+\+R\+E\+AD}, \hyperlink{event_handling_EVENT_PACKET_SENT}{E\+V\+E\+N\+T\+\_\+\+P\+A\+C\+K\+E\+T\+\_\+\+S\+E\+NT}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
string str = ftp.getAsString(\textcolor{stringliteral}{"file.txt"});
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em F\+T\+P-\/\+R\+E\+C\+E\+I\+V\+E-\/\+E\+R\+R\+OR} & Incomplete message received on control port \\
\hline
{\em F\+T\+P-\/\+F\+I\+L\+E-\/\+O\+P\+E\+N-\/\+E\+R\+R\+OR} & Could not create the local file \\
\hline
{\em F\+T\+P-\/\+G\+E\+T-\/\+E\+R\+R\+OR} & There was an error retrieving the file\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}
see \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}
\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 \hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}; see \hyperlink{class_qore_1_1_ftp_client_a2b06a66db173df6bac61b1af48c7a11c}{Ftp\+Client\+::get()} for a function that will \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_ab07b745d71fb0d9be7860fd41c9450c8}\label{class_qore_1_1_ftp_client_ab07b745d71fb0d9be7860fd41c9450c8}} 
\index{Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}!get\+Control\+Peer\+Info@{get\+Control\+Peer\+Info}}
\index{get\+Control\+Peer\+Info@{get\+Control\+Peer\+Info}!Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}}
\subsubsection{\texorpdfstring{get\+Control\+Peer\+Info()}{getControlPeerInfo()}}
{\footnotesize\ttfamily \hyperlink{group__type__conversion__functions_ga0231dbb472dd230310af7c7c34f56e92}{hash}$<$auto$>$ Qore\+::\+Ftp\+Client\+::get\+Control\+Peer\+Info (\begin{DoxyParamCaption}\item[{bool}]{host\+\_\+lookup = {\ttfamily \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}
hash<auto> h = ftp.getControlPeerInfo();
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em host\+\_\+lookup} & do a lookup of the hostname; if this is \hyperlink{group__boolean__constants_ga9da2b9a8003cd3788e48305f8a00540f}{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 \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 S\+O\+C\+K\+E\+T-\/\+N\+O\+T-\/\+O\+P\+EN} & The socket is not open \\
\hline
{\em S\+O\+C\+K\+E\+T-\/\+G\+E\+T\+P\+E\+E\+R\+I\+N\+F\+O-\/\+E\+R\+R\+OR} & 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\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}!get\+Control\+Socket\+Info@{get\+Control\+Socket\+Info}}
\index{get\+Control\+Socket\+Info@{get\+Control\+Socket\+Info}!Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}}
\subsubsection{\texorpdfstring{get\+Control\+Socket\+Info()}{getControlSocketInfo()}}
{\footnotesize\ttfamily \hyperlink{group__type__conversion__functions_ga0231dbb472dd230310af7c7c34f56e92}{hash}$<$auto$>$ Qore\+::\+Ftp\+Client\+::get\+Control\+Socket\+Info (\begin{DoxyParamCaption}\item[{bool}]{host\+\_\+lookup = {\ttfamily \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}
hash<auto> h = ftp.getControlSocketInfo();
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em host\+\_\+lookup} & do a lookup of the hostname; if this is \hyperlink{group__boolean__constants_ga9da2b9a8003cd3788e48305f8a00540f}{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 \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 S\+O\+C\+K\+E\+T-\/\+N\+O\+T-\/\+O\+P\+EN} & The socket is not open \\
\hline
{\em S\+O\+C\+K\+E\+T-\/\+G\+E\+T\+S\+O\+C\+K\+E\+T\+I\+N\+F\+O-\/\+E\+R\+R\+OR} & 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\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}!get\+Data\+Peer\+Info@{get\+Data\+Peer\+Info}}
\index{get\+Data\+Peer\+Info@{get\+Data\+Peer\+Info}!Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}}
\subsubsection{\texorpdfstring{get\+Data\+Peer\+Info()}{getDataPeerInfo()}}
{\footnotesize\ttfamily \hyperlink{group__type__conversion__functions_ga0231dbb472dd230310af7c7c34f56e92}{hash}$<$auto$>$ Qore\+::\+Ftp\+Client\+::get\+Data\+Peer\+Info (\begin{DoxyParamCaption}\item[{bool}]{host\+\_\+lookup = {\ttfamily \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}
hash<auto> h = ftp.getDataPeerInfo();
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em host\+\_\+lookup} & do a lookup of the hostname; if this is \hyperlink{group__boolean__constants_ga9da2b9a8003cd3788e48305f8a00540f}{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 \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 S\+O\+C\+K\+E\+T-\/\+N\+O\+T-\/\+O\+P\+EN} & The socket is not open \\
\hline
{\em S\+O\+C\+K\+E\+T-\/\+G\+E\+T\+P\+E\+E\+R\+I\+N\+F\+O-\/\+E\+R\+R\+OR} & 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\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}!get\+Data\+Socket\+Info@{get\+Data\+Socket\+Info}}
\index{get\+Data\+Socket\+Info@{get\+Data\+Socket\+Info}!Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}}
\subsubsection{\texorpdfstring{get\+Data\+Socket\+Info()}{getDataSocketInfo()}}
{\footnotesize\ttfamily \hyperlink{group__type__conversion__functions_ga0231dbb472dd230310af7c7c34f56e92}{hash}$<$auto$>$ Qore\+::\+Ftp\+Client\+::get\+Data\+Socket\+Info (\begin{DoxyParamCaption}\item[{bool}]{host\+\_\+lookup = {\ttfamily \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}
hash<auto> h = ftp.getControlSocketInfo();
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em host\+\_\+lookup} & do a lookup of the hostname; if this is \hyperlink{group__boolean__constants_ga9da2b9a8003cd3788e48305f8a00540f}{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 \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 S\+O\+C\+K\+E\+T-\/\+N\+O\+T-\/\+O\+P\+EN} & The socket is not open \\
\hline
{\em S\+O\+C\+K\+E\+T-\/\+G\+E\+T\+S\+O\+C\+K\+E\+T\+I\+N\+F\+O-\/\+E\+R\+R\+OR} & 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\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}!get\+Host\+Name@{get\+Host\+Name}}
\index{get\+Host\+Name@{get\+Host\+Name}!Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}}
\subsubsection{\texorpdfstring{get\+Host\+Name()}{getHostName()}}
{\footnotesize\ttfamily \+\_\+\+\_\+7\+\_\+ \hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} Qore\+::\+Ftp\+Client\+::get\+Host\+Name (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns the current hostname value or \hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG} if none is set. 

\begin{DoxyReturn}{Returns}
the current hostname value that will be used for the next connection or \hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG} if none is set
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
*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\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}!get\+Mode@{get\+Mode}}
\index{get\+Mode@{get\+Mode}!Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}}
\subsubsection{\texorpdfstring{get\+Mode()}{getMode()}}
{\footnotesize\ttfamily \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\+:}
\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
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\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}!get\+Network\+Family@{get\+Network\+Family}}
\index{get\+Network\+Family@{get\+Network\+Family}!Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}}
\subsubsection{\texorpdfstring{get\+Network\+Family()}{getNetworkFamily()}}
{\footnotesize\ttfamily \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 \hyperlink{group__network__address__family__constants}{Network Address Family Constants} for valid values; \hyperlink{group__network__address__family__constants_gac4f81abe9d374562b41117c51950fb80}{Qore\+::\+A\+F\+\_\+\+U\+N\+S\+P\+EC} means to automatically choose the family (the default)
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
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\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}!get\+Password@{get\+Password}}
\index{get\+Password@{get\+Password}!Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}}
\subsubsection{\texorpdfstring{get\+Password()}{getPassword()}}
{\footnotesize\ttfamily \+\_\+\+\_\+7\+\_\+ \hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} Qore\+::\+Ftp\+Client\+::get\+Password (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns the current password value or \hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG} if none is set. 

\begin{DoxyReturn}{Returns}
the current password value that will be used for the next connection or \hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG} if none is set
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
*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\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}!get\+Port@{get\+Port}}
\index{get\+Port@{get\+Port}!Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}}
\subsubsection{\texorpdfstring{get\+Port()}{getPort()}}
{\footnotesize\ttfamily \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}
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\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}!get\+S\+S\+L\+Cipher\+Name@{get\+S\+S\+L\+Cipher\+Name}}
\index{get\+S\+S\+L\+Cipher\+Name@{get\+S\+S\+L\+Cipher\+Name}!Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}}
\subsubsection{\texorpdfstring{get\+S\+S\+L\+Cipher\+Name()}{getSSLCipherName()}}
{\footnotesize\ttfamily \+\_\+\+\_\+7\+\_\+ \hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} Qore\+::\+Ftp\+Client\+::get\+S\+S\+L\+Cipher\+Name (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns the name of the cipher for an encrypted connection or \hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG} if an encrypted connection is not established. 

\begin{DoxyReturn}{Returns}
the name of the cipher for an encrypted connection or \hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG} if an encrypted connection is not established
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
\textcolor{keywordflow}{if} (ftp.isSecure())
    \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\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}!get\+S\+S\+L\+Cipher\+Version@{get\+S\+S\+L\+Cipher\+Version}}
\index{get\+S\+S\+L\+Cipher\+Version@{get\+S\+S\+L\+Cipher\+Version}!Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}}
\subsubsection{\texorpdfstring{get\+S\+S\+L\+Cipher\+Version()}{getSSLCipherVersion()}}
{\footnotesize\ttfamily \+\_\+\+\_\+7\+\_\+ \hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} Qore\+::\+Ftp\+Client\+::get\+S\+S\+L\+Cipher\+Version (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns the version of the cipher for an encrypted connection or \hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG} if an encrypted connection is not established. 

\begin{DoxyReturn}{Returns}
the version of the cipher for an encrypted connection or \hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG} if an encrypted connection is not established
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
\textcolor{keywordflow}{if} (ftp.isSecure())
    \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\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}!get\+Timeout@{get\+Timeout}}
\index{get\+Timeout@{get\+Timeout}!Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}}
\subsubsection{\texorpdfstring{get\+Timeout()}{getTimeout()}}
{\footnotesize\ttfamily \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\+:}
\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}
\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\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}!get\+U\+RL@{get\+U\+RL}}
\index{get\+U\+RL@{get\+U\+RL}!Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}}
\subsubsection{\texorpdfstring{get\+U\+R\+L()}{getURL()}}
{\footnotesize\ttfamily \hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} Qore\+::\+Ftp\+Client\+::get\+U\+RL (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Retrieves the current connection U\+RL string for this object. 

\begin{DoxyReturn}{Returns}
the current connection U\+RL string for this object
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
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\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}!get\+Usage\+Info@{get\+Usage\+Info}}
\index{get\+Usage\+Info@{get\+Usage\+Info}!Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}}
\subsubsection{\texorpdfstring{get\+Usage\+Info()}{getUsageInfo()}}
{\footnotesize\ttfamily \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\+:}
\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
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 \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 \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 \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}
\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\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}!get\+User\+Name@{get\+User\+Name}}
\index{get\+User\+Name@{get\+User\+Name}!Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}}
\subsubsection{\texorpdfstring{get\+User\+Name()}{getUserName()}}
{\footnotesize\ttfamily \+\_\+\+\_\+7\+\_\+ \hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} Qore\+::\+Ftp\+Client\+::get\+User\+Name (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns the current username value or \hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG} if none is set. 

\begin{DoxyReturn}{Returns}
the current username value that will be used for the next connection or \hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG} if none is set
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
*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\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}!is\+Data\+Secure@{is\+Data\+Secure}}
\index{is\+Data\+Secure@{is\+Data\+Secure}!Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}}
\subsubsection{\texorpdfstring{is\+Data\+Secure()}{isDataSecure()}}
{\footnotesize\ttfamily bool Qore\+::\+Ftp\+Client\+::is\+Data\+Secure (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns \hyperlink{group__boolean__constants_ga3ba2df91713a6249449347131ea526c3}{True} if the data connections are secure T\+L\+S/\+S\+SL connections, \hyperlink{group__boolean__constants_ga9da2b9a8003cd3788e48305f8a00540f}{False} if not. 

\begin{DoxyReturn}{Returns}
\hyperlink{group__boolean__constants_ga3ba2df91713a6249449347131ea526c3}{True} if the data connections are secure T\+L\+S/\+S\+SL connections, \hyperlink{group__boolean__constants_ga9da2b9a8003cd3788e48305f8a00540f}{False} if not
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
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\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}!is\+Secure@{is\+Secure}}
\index{is\+Secure@{is\+Secure}!Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}}
\subsubsection{\texorpdfstring{is\+Secure()}{isSecure()}}
{\footnotesize\ttfamily bool Qore\+::\+Ftp\+Client\+::is\+Secure (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns \hyperlink{group__boolean__constants_ga3ba2df91713a6249449347131ea526c3}{True} if the control connection is a secure T\+L\+S/\+S\+SL connection, \hyperlink{group__boolean__constants_ga9da2b9a8003cd3788e48305f8a00540f}{False} if not. 

\begin{DoxyReturn}{Returns}
\hyperlink{group__boolean__constants_ga3ba2df91713a6249449347131ea526c3}{True} if the control connection is a secure T\+L\+S/\+S\+SL connection, \hyperlink{group__boolean__constants_ga9da2b9a8003cd3788e48305f8a00540f}{False} if not
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
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\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}!list@{list}}
\index{list@{list}!Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}}
\subsubsection{\texorpdfstring{list()}{list()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \+\_\+\+\_\+7\+\_\+ \hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} Qore\+::\+Ftp\+Client\+::list (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns a list of files from the F\+TP server in the server\textquotesingle{}s long format in the current working directory or \hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG} if the path cannot be found. 

\begin{DoxyParagraph}{Events\+:}
\hyperlink{event_handling_EVENT_FTP_SEND_MESSAGE}{E\+V\+E\+N\+T\+\_\+\+F\+T\+P\+\_\+\+S\+E\+N\+D\+\_\+\+M\+E\+S\+S\+A\+GE}, \hyperlink{event_handling_EVENT_FTP_MESSAGE_RECEIVED}{E\+V\+E\+N\+T\+\_\+\+F\+T\+P\+\_\+\+M\+E\+S\+S\+A\+G\+E\+\_\+\+R\+E\+C\+E\+I\+V\+ED}, \hyperlink{event_handling_EVENT_PACKET_READ}{E\+V\+E\+N\+T\+\_\+\+P\+A\+C\+K\+E\+T\+\_\+\+R\+E\+AD}, \hyperlink{event_handling_EVENT_PACKET_SENT}{E\+V\+E\+N\+T\+\_\+\+P\+A\+C\+K\+E\+T\+\_\+\+S\+E\+NT}
\end{DoxyParagraph}
\begin{DoxyReturn}{Returns}
a list of files from the F\+TP server in the server\textquotesingle{}s long format in the current working directory or \hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG} if the path cannot be found
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
*string str = ftp.list();
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em F\+T\+P-\/\+R\+E\+C\+E\+I\+V\+E-\/\+E\+R\+R\+OR} & Incomplete message received on control port \\
\hline
{\em F\+T\+P-\/\+L\+I\+S\+T-\/\+E\+R\+R\+OR} & F\+TP server returned an error in response to the L\+I\+ST command\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}
see \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}
\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\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}!list@{list}}
\index{list@{list}!Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}}
\subsubsection{\texorpdfstring{list()}{list()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \+\_\+\+\_\+7\+\_\+ \hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} Qore\+::\+Ftp\+Client\+::list (\begin{DoxyParamCaption}\item[{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}]{path }\end{DoxyParamCaption})}



Returns a list of files from the F\+TP server in the server\textquotesingle{}s long format for the given path or \hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG} 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 F\+TP server in the server\textquotesingle{}s long format for the given path or \hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG} if the path cannot be found
\end{DoxyReturn}
\begin{DoxyParagraph}{Events\+:}
\hyperlink{event_handling_EVENT_FTP_SEND_MESSAGE}{E\+V\+E\+N\+T\+\_\+\+F\+T\+P\+\_\+\+S\+E\+N\+D\+\_\+\+M\+E\+S\+S\+A\+GE}, \hyperlink{event_handling_EVENT_FTP_MESSAGE_RECEIVED}{E\+V\+E\+N\+T\+\_\+\+F\+T\+P\+\_\+\+M\+E\+S\+S\+A\+G\+E\+\_\+\+R\+E\+C\+E\+I\+V\+ED}, \hyperlink{event_handling_EVENT_PACKET_READ}{E\+V\+E\+N\+T\+\_\+\+P\+A\+C\+K\+E\+T\+\_\+\+R\+E\+AD}, \hyperlink{event_handling_EVENT_PACKET_SENT}{E\+V\+E\+N\+T\+\_\+\+P\+A\+C\+K\+E\+T\+\_\+\+S\+E\+NT}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
*string str = ftp.list(\textcolor{stringliteral}{"/tmp/file*.txt"});
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em F\+T\+P-\/\+R\+E\+C\+E\+I\+V\+E-\/\+E\+R\+R\+OR} & Incomplete message received on control port \\
\hline
{\em F\+T\+P-\/\+L\+I\+S\+T-\/\+E\+R\+R\+OR} & F\+TP server returned an error in response to the L\+I\+ST command\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}
see \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}
\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\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}!mkdir@{mkdir}}
\index{mkdir@{mkdir}!Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}}
\subsubsection{\texorpdfstring{mkdir()}{mkdir()}}
{\footnotesize\ttfamily nothing Qore\+::\+Ftp\+Client\+::mkdir (\begin{DoxyParamCaption}\item[{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}]{remote\+\_\+path }\end{DoxyParamCaption})}



Creates a directory on the F\+TP 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\+:}
\hyperlink{event_handling_EVENT_FTP_SEND_MESSAGE}{E\+V\+E\+N\+T\+\_\+\+F\+T\+P\+\_\+\+S\+E\+N\+D\+\_\+\+M\+E\+S\+S\+A\+GE}, \hyperlink{event_handling_EVENT_FTP_MESSAGE_RECEIVED}{E\+V\+E\+N\+T\+\_\+\+F\+T\+P\+\_\+\+M\+E\+S\+S\+A\+G\+E\+\_\+\+R\+E\+C\+E\+I\+V\+ED}, \hyperlink{event_handling_EVENT_PACKET_READ}{E\+V\+E\+N\+T\+\_\+\+P\+A\+C\+K\+E\+T\+\_\+\+R\+E\+AD}, \hyperlink{event_handling_EVENT_PACKET_SENT}{E\+V\+E\+N\+T\+\_\+\+P\+A\+C\+K\+E\+T\+\_\+\+S\+E\+NT}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
ftp.mkdir(\textcolor{stringliteral}{"tmp"});
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em F\+T\+P-\/\+R\+E\+C\+E\+I\+V\+E-\/\+E\+R\+R\+OR} & Incomplete message received on control port \\
\hline
{\em F\+T\+P-\/\+M\+K\+D\+I\+R-\/\+E\+R\+R\+OR} & F\+TP server returned an error to the {\ttfamily M\+KD} command\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}
see \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\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}!nlst@{nlst}}
\index{nlst@{nlst}!Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}}
\subsubsection{\texorpdfstring{nlst()}{nlst()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \+\_\+\+\_\+7\+\_\+ \hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} Qore\+::\+Ftp\+Client\+::nlst (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns a list of file names from the F\+TP server in the current working directory or \hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG} if the path cannot be found. 

\begin{DoxyReturn}{Returns}
a list of file names from the F\+TP server in the current working directory or \hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG} if the path cannot be found
\end{DoxyReturn}
\begin{DoxyParagraph}{Events\+:}
\hyperlink{event_handling_EVENT_FTP_SEND_MESSAGE}{E\+V\+E\+N\+T\+\_\+\+F\+T\+P\+\_\+\+S\+E\+N\+D\+\_\+\+M\+E\+S\+S\+A\+GE}, \hyperlink{event_handling_EVENT_FTP_MESSAGE_RECEIVED}{E\+V\+E\+N\+T\+\_\+\+F\+T\+P\+\_\+\+M\+E\+S\+S\+A\+G\+E\+\_\+\+R\+E\+C\+E\+I\+V\+ED}, \hyperlink{event_handling_EVENT_PACKET_READ}{E\+V\+E\+N\+T\+\_\+\+P\+A\+C\+K\+E\+T\+\_\+\+R\+E\+AD}, \hyperlink{event_handling_EVENT_PACKET_SENT}{E\+V\+E\+N\+T\+\_\+\+P\+A\+C\+K\+E\+T\+\_\+\+S\+E\+NT}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
*string str = ftp.nlst();
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em F\+T\+P-\/\+R\+E\+C\+E\+I\+V\+E-\/\+E\+R\+R\+OR} & Incomplete message received on control port \\
\hline
{\em F\+T\+P-\/\+L\+I\+S\+T-\/\+E\+R\+R\+OR} & F\+TP server returned an error in response to the N\+L\+ST command\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}
see \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}
\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\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}!nlst@{nlst}}
\index{nlst@{nlst}!Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}}
\subsubsection{\texorpdfstring{nlst()}{nlst()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \+\_\+\+\_\+7\+\_\+ \hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} Qore\+::\+Ftp\+Client\+::nlst (\begin{DoxyParamCaption}\item[{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}]{path }\end{DoxyParamCaption})}



Returns a list of file names from the F\+TP server for the given path or \hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG} 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 F\+TP server for the given path or \hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG} if the path cannot be found
\end{DoxyReturn}
\begin{DoxyParagraph}{Events\+:}
\hyperlink{event_handling_EVENT_FTP_SEND_MESSAGE}{E\+V\+E\+N\+T\+\_\+\+F\+T\+P\+\_\+\+S\+E\+N\+D\+\_\+\+M\+E\+S\+S\+A\+GE}, \hyperlink{event_handling_EVENT_FTP_MESSAGE_RECEIVED}{E\+V\+E\+N\+T\+\_\+\+F\+T\+P\+\_\+\+M\+E\+S\+S\+A\+G\+E\+\_\+\+R\+E\+C\+E\+I\+V\+ED}, \hyperlink{event_handling_EVENT_PACKET_READ}{E\+V\+E\+N\+T\+\_\+\+P\+A\+C\+K\+E\+T\+\_\+\+R\+E\+AD}, \hyperlink{event_handling_EVENT_PACKET_SENT}{E\+V\+E\+N\+T\+\_\+\+P\+A\+C\+K\+E\+T\+\_\+\+S\+E\+NT}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
*string str = ftp.nlst(\textcolor{stringliteral}{"/tmp/file*.txt"});
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em F\+T\+P-\/\+R\+E\+C\+E\+I\+V\+E-\/\+E\+R\+R\+OR} & Incomplete message received on control port \\
\hline
{\em F\+T\+P-\/\+L\+I\+S\+T-\/\+E\+R\+R\+OR} & F\+TP server returned an error in response to the L\+I\+ST command\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}
see \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}
\hyperlink{class_qore_1_1_ftp_client_a21409b36294103779bba4f872e6ff8aa}{Ftp\+Client\+::list()} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{class_qore_1_1_ftp_client_a835c52e32ee089773d48574f297e7965}\label{class_qore_1_1_ftp_client_a835c52e32ee089773d48574f297e7965}} 
\index{Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}!put@{put}}
\index{put@{put}!Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}}
\subsubsection{\texorpdfstring{put()}{put()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily nothing Qore\+::\+Ftp\+Client\+::put (\begin{DoxyParamCaption}\item[{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}]{local\+\_\+path,  }\item[{\+\_\+\+\_\+7\+\_\+ \hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}]{remote\+\_\+path }\end{DoxyParamCaption})}



Transfers a local file to the F\+TP server; if any errors occur, an exception is thrown. 

\begin{DoxyParagraph}{Restrictions\+:}
\hyperlink{group__parse__options_ga5e466ed886222f0b57b0a399b455be71}{Qore\+::\+P\+O\+\_\+\+N\+O\+\_\+\+F\+I\+L\+E\+S\+Y\+S\+T\+EM}
\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\+:}
\hyperlink{event_handling_EVENT_FTP_SEND_MESSAGE}{E\+V\+E\+N\+T\+\_\+\+F\+T\+P\+\_\+\+S\+E\+N\+D\+\_\+\+M\+E\+S\+S\+A\+GE}, \hyperlink{event_handling_EVENT_FTP_MESSAGE_RECEIVED}{E\+V\+E\+N\+T\+\_\+\+F\+T\+P\+\_\+\+M\+E\+S\+S\+A\+G\+E\+\_\+\+R\+E\+C\+E\+I\+V\+ED}, \hyperlink{event_handling_EVENT_PACKET_READ}{E\+V\+E\+N\+T\+\_\+\+P\+A\+C\+K\+E\+T\+\_\+\+R\+E\+AD}, \hyperlink{event_handling_EVENT_PACKET_SENT}{E\+V\+E\+N\+T\+\_\+\+P\+A\+C\+K\+E\+T\+\_\+\+S\+E\+NT}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
ftp.put(\textcolor{stringliteral}{"/tmp/file-1.txt"}, \textcolor{stringliteral}{"file.txt"});
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em F\+T\+P-\/\+R\+E\+C\+E\+I\+V\+E-\/\+E\+R\+R\+OR} & Incomplete message received on control port \\
\hline
{\em F\+T\+P-\/\+F\+I\+L\+E-\/\+O\+P\+E\+N-\/\+E\+R\+R\+OR} & Could not open local file for reading \\
\hline
{\em F\+T\+P-\/\+F\+I\+L\+E-\/\+P\+U\+T-\/\+E\+R\+R\+OR} & Could not determine file size of local file (\hyperlink{group__filesystem__functions_gab58a26fdb5c2e9935729993e688bd5a8}{stat()} failed) \\
\hline
{\em F\+T\+P-\/\+P\+U\+T-\/\+E\+R\+R\+OR} & An error occurred while sending the file\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}
see \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}
\hyperlink{class_qore_1_1_ftp_client_aeb0580e5a740c437a18329ee6fab03f8}{Ftp\+Client\+::put\+Data()} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{class_qore_1_1_ftp_client_ac44baa2151f3a892bc96abe6d0e54714}\label{class_qore_1_1_ftp_client_ac44baa2151f3a892bc96abe6d0e54714}} 
\index{Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}!put@{put}}
\index{put@{put}!Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}}
\subsubsection{\texorpdfstring{put()}{put()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily nothing Qore\+::\+Ftp\+Client\+::put (\begin{DoxyParamCaption}\item[{\hyperlink{class_qore_1_1_input_stream}{Qore\+::\+Input\+Stream}}]{is,  }\item[{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}]{remote\+\_\+path }\end{DoxyParamCaption})}



Transfers the content of an \hyperlink{class_qore_1_1_input_stream}{Input\+Stream} to the F\+TP server; if any errors occur, an exception is thrown. 


\begin{DoxyParams}{Parameters}
{\em is} & The intput stream to send to the F\+TP server \\
\hline
{\em remote\+\_\+path} & The name of the file on the server\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Events\+:}
\hyperlink{event_handling_EVENT_FTP_SEND_MESSAGE}{E\+V\+E\+N\+T\+\_\+\+F\+T\+P\+\_\+\+S\+E\+N\+D\+\_\+\+M\+E\+S\+S\+A\+GE}, \hyperlink{event_handling_EVENT_FTP_MESSAGE_RECEIVED}{E\+V\+E\+N\+T\+\_\+\+F\+T\+P\+\_\+\+M\+E\+S\+S\+A\+G\+E\+\_\+\+R\+E\+C\+E\+I\+V\+ED}, \hyperlink{event_handling_EVENT_PACKET_READ}{E\+V\+E\+N\+T\+\_\+\+P\+A\+C\+K\+E\+T\+\_\+\+R\+E\+AD}, \hyperlink{event_handling_EVENT_PACKET_SENT}{E\+V\+E\+N\+T\+\_\+\+P\+A\+C\+K\+E\+T\+\_\+\+S\+E\+NT}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
ftp.put(new FileInputStream(\textcolor{stringliteral}{"/tmp/file-1.txt"}), \textcolor{stringliteral}{"file.txt"});
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em F\+T\+P-\/\+R\+E\+C\+E\+I\+V\+E-\/\+E\+R\+R\+OR} & Incomplete message received on control port \\
\hline
{\em F\+T\+P-\/\+F\+I\+L\+E-\/\+O\+P\+E\+N-\/\+E\+R\+R\+OR} & Could not open local file for reading \\
\hline
{\em F\+T\+P-\/\+F\+I\+L\+E-\/\+P\+U\+T-\/\+E\+R\+R\+OR} & Could not determine file size of local file (\hyperlink{group__filesystem__functions_gab58a26fdb5c2e9935729993e688bd5a8}{stat()} failed) \\
\hline
{\em F\+T\+P-\/\+P\+U\+T-\/\+E\+R\+R\+OR} & An error occurred while sending the file\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}
see \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}
\hyperlink{class_qore_1_1_ftp_client_aeb0580e5a740c437a18329ee6fab03f8}{Ftp\+Client\+::put\+Data()} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{class_qore_1_1_ftp_client_aeb0580e5a740c437a18329ee6fab03f8}\label{class_qore_1_1_ftp_client_aeb0580e5a740c437a18329ee6fab03f8}} 
\index{Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}!put\+Data@{put\+Data}}
\index{put\+Data@{put\+Data}!Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}}
\subsubsection{\texorpdfstring{put\+Data()}{putData()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily nothing Qore\+::\+Ftp\+Client\+::put\+Data (\begin{DoxyParamCaption}\item[{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}]{data,  }\item[{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}]{remote\+\_\+path }\end{DoxyParamCaption})}



Transfers string data to the F\+TP 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\+:}
\hyperlink{event_handling_EVENT_FTP_SEND_MESSAGE}{E\+V\+E\+N\+T\+\_\+\+F\+T\+P\+\_\+\+S\+E\+N\+D\+\_\+\+M\+E\+S\+S\+A\+GE}, \hyperlink{event_handling_EVENT_FTP_MESSAGE_RECEIVED}{E\+V\+E\+N\+T\+\_\+\+F\+T\+P\+\_\+\+M\+E\+S\+S\+A\+G\+E\+\_\+\+R\+E\+C\+E\+I\+V\+ED}, \hyperlink{event_handling_EVENT_PACKET_READ}{E\+V\+E\+N\+T\+\_\+\+P\+A\+C\+K\+E\+T\+\_\+\+R\+E\+AD}, \hyperlink{event_handling_EVENT_PACKET_SENT}{E\+V\+E\+N\+T\+\_\+\+P\+A\+C\+K\+E\+T\+\_\+\+S\+E\+NT}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
ftp.putData(str, \textcolor{stringliteral}{"file.txt"});
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em F\+T\+P-\/\+R\+E\+C\+E\+I\+V\+E-\/\+E\+R\+R\+OR} & Incomplete message received on control port \\
\hline
{\em F\+T\+P-\/\+P\+U\+T-\/\+E\+R\+R\+OR} & An error occurred while sending the file\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}
see \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_a3434ced4c5c1c62a03e7722abcb24cfc}\label{class_qore_1_1_ftp_client_a3434ced4c5c1c62a03e7722abcb24cfc}} 
\index{Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}!put\+Data@{put\+Data}}
\index{put\+Data@{put\+Data}!Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}}
\subsubsection{\texorpdfstring{put\+Data()}{putData()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily nothing Qore\+::\+Ftp\+Client\+::put\+Data (\begin{DoxyParamCaption}\item[{\hyperlink{group__type__conversion__functions_gaf11c7f5c43ced1e9b95bd2270ee87ed9}{binary}}]{data,  }\item[{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}]{remote\+\_\+path }\end{DoxyParamCaption})}



Transfers binary data to the F\+TP 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\+:}
\hyperlink{event_handling_EVENT_FTP_SEND_MESSAGE}{E\+V\+E\+N\+T\+\_\+\+F\+T\+P\+\_\+\+S\+E\+N\+D\+\_\+\+M\+E\+S\+S\+A\+GE}, \hyperlink{event_handling_EVENT_FTP_MESSAGE_RECEIVED}{E\+V\+E\+N\+T\+\_\+\+F\+T\+P\+\_\+\+M\+E\+S\+S\+A\+G\+E\+\_\+\+R\+E\+C\+E\+I\+V\+ED}, \hyperlink{event_handling_EVENT_PACKET_READ}{E\+V\+E\+N\+T\+\_\+\+P\+A\+C\+K\+E\+T\+\_\+\+R\+E\+AD}, \hyperlink{event_handling_EVENT_PACKET_SENT}{E\+V\+E\+N\+T\+\_\+\+P\+A\+C\+K\+E\+T\+\_\+\+S\+E\+NT}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
ftp.putData(bin, \textcolor{stringliteral}{"file.pdf"});
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em F\+T\+P-\/\+R\+E\+C\+E\+I\+V\+E-\/\+E\+R\+R\+OR} & Incomplete message received on control port \\
\hline
{\em F\+T\+P-\/\+P\+U\+T-\/\+E\+R\+R\+OR} & An error occurred while sending the file\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}
see \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\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}!pwd@{pwd}}
\index{pwd@{pwd}!Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}}
\subsubsection{\texorpdfstring{pwd()}{pwd()}}
{\footnotesize\ttfamily \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\+:}
\hyperlink{event_handling_EVENT_FTP_SEND_MESSAGE}{E\+V\+E\+N\+T\+\_\+\+F\+T\+P\+\_\+\+S\+E\+N\+D\+\_\+\+M\+E\+S\+S\+A\+GE}, \hyperlink{event_handling_EVENT_FTP_MESSAGE_RECEIVED}{E\+V\+E\+N\+T\+\_\+\+F\+T\+P\+\_\+\+M\+E\+S\+S\+A\+G\+E\+\_\+\+R\+E\+C\+E\+I\+V\+ED}, \hyperlink{event_handling_EVENT_PACKET_READ}{E\+V\+E\+N\+T\+\_\+\+P\+A\+C\+K\+E\+T\+\_\+\+R\+E\+AD}, \hyperlink{event_handling_EVENT_PACKET_SENT}{E\+V\+E\+N\+T\+\_\+\+P\+A\+C\+K\+E\+T\+\_\+\+S\+E\+NT}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
string str = ftp.pwd();
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em F\+T\+P-\/\+R\+E\+C\+E\+I\+V\+E-\/\+E\+R\+R\+OR} & Incomplete message received on control port \\
\hline
{\em F\+T\+P-\/\+P\+W\+D-\/\+E\+R\+R\+OR} & F\+TP server returned an error to the P\+WD command\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}
see \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\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}!rename@{rename}}
\index{rename@{rename}!Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}}
\subsubsection{\texorpdfstring{rename()}{rename()}}
{\footnotesize\ttfamily nothing Qore\+::\+Ftp\+Client\+::rename (\begin{DoxyParamCaption}\item[{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}]{from,  }\item[{\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\+:}
\hyperlink{event_handling_EVENT_FTP_SEND_MESSAGE}{E\+V\+E\+N\+T\+\_\+\+F\+T\+P\+\_\+\+S\+E\+N\+D\+\_\+\+M\+E\+S\+S\+A\+GE}, \hyperlink{event_handling_EVENT_FTP_MESSAGE_RECEIVED}{E\+V\+E\+N\+T\+\_\+\+F\+T\+P\+\_\+\+M\+E\+S\+S\+A\+G\+E\+\_\+\+R\+E\+C\+E\+I\+V\+ED}, \hyperlink{event_handling_EVENT_PACKET_READ}{E\+V\+E\+N\+T\+\_\+\+P\+A\+C\+K\+E\+T\+\_\+\+R\+E\+AD}, \hyperlink{event_handling_EVENT_PACKET_SENT}{E\+V\+E\+N\+T\+\_\+\+P\+A\+C\+K\+E\+T\+\_\+\+S\+E\+NT}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
ftp.rename(\textcolor{stringliteral}{"file.txt"}, \textcolor{stringliteral}{"file.txt.orig"});
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em F\+T\+P-\/\+R\+E\+C\+E\+I\+V\+E-\/\+E\+R\+R\+OR} & Incomplete message received on control port \\
\hline
{\em F\+T\+P-\/\+R\+E\+N\+A\+M\+E-\/\+E\+R\+R\+OR} & F\+TP server returned an error to the {\ttfamily R\+N\+FR} or {\ttfamily R\+N\+TO} commands\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}
see \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\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}!rmdir@{rmdir}}
\index{rmdir@{rmdir}!Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}}
\subsubsection{\texorpdfstring{rmdir()}{rmdir()}}
{\footnotesize\ttfamily nothing Qore\+::\+Ftp\+Client\+::rmdir (\begin{DoxyParamCaption}\item[{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}]{remote\+\_\+path }\end{DoxyParamCaption})}



Removes a directory on the remote F\+TP 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\+:}
\hyperlink{event_handling_EVENT_FTP_SEND_MESSAGE}{E\+V\+E\+N\+T\+\_\+\+F\+T\+P\+\_\+\+S\+E\+N\+D\+\_\+\+M\+E\+S\+S\+A\+GE}, \hyperlink{event_handling_EVENT_FTP_MESSAGE_RECEIVED}{E\+V\+E\+N\+T\+\_\+\+F\+T\+P\+\_\+\+M\+E\+S\+S\+A\+G\+E\+\_\+\+R\+E\+C\+E\+I\+V\+ED}, \hyperlink{event_handling_EVENT_PACKET_READ}{E\+V\+E\+N\+T\+\_\+\+P\+A\+C\+K\+E\+T\+\_\+\+R\+E\+AD}, \hyperlink{event_handling_EVENT_PACKET_SENT}{E\+V\+E\+N\+T\+\_\+\+P\+A\+C\+K\+E\+T\+\_\+\+S\+E\+NT}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
ftp.rmdir(\textcolor{stringliteral}{"tmp"});
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em F\+T\+P-\/\+R\+E\+C\+E\+I\+V\+E-\/\+E\+R\+R\+OR} & Incomplete message received on control port \\
\hline
{\em F\+T\+P-\/\+R\+M\+D\+I\+R-\/\+E\+R\+R\+OR} & F\+TP server returned an error to the {\ttfamily R\+MD} command\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}
see \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_a8e7b3685bc3ac840bf64896f7d1868c3}\label{class_qore_1_1_ftp_client_a8e7b3685bc3ac840bf64896f7d1868c3}} 
\index{Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}!set\+Control\+Event\+Queue@{set\+Control\+Event\+Queue}}
\index{set\+Control\+Event\+Queue@{set\+Control\+Event\+Queue}!Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}}
\subsubsection{\texorpdfstring{set\+Control\+Event\+Queue()}{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 \hyperlink{class_qore_1_1_ftp_client}{Ftp\+Client} object so that \hyperlink{event_handling}{I/O events} are no longer captured on the object on the control connection. 

\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
ftp.setControlEventQueue();
\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_ftp_client_ab3d6a350e07f923ada80f46f3078c109}\label{class_qore_1_1_ftp_client_ab3d6a350e07f923ada80f46f3078c109}} 
\index{Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}!set\+Control\+Event\+Queue@{set\+Control\+Event\+Queue}}
\index{set\+Control\+Event\+Queue@{set\+Control\+Event\+Queue}!Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}}
\subsubsection{\texorpdfstring{set\+Control\+Event\+Queue()}{setControlEventQueue()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily nothing Qore\+::\+Ftp\+Client\+::set\+Control\+Event\+Queue (\begin{DoxyParamCaption}\item[{\hyperlink{class_qore_1_1_thread_1_1_queue}{Qore\+::\+Thread\+::\+Queue}}]{queue }\end{DoxyParamCaption})}



Sets a Queue object to receive \hyperlink{class_qore_1_1_ftp_client}{Ftp\+Client} and \hyperlink{class_qore_1_1_socket}{Socket} events on the control connection. 


\begin{DoxyParams}{Parameters}
{\em queue} & a \hyperlink{class_qore_1_1_thread_1_1_queue}{Queue} object to receive \hyperlink{class_qore_1_1_ftp_client}{Ftp\+Client} and \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 Q\+U\+E\+U\+E-\/\+E\+R\+R\+OR will be thrown\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
ftp.setControlEventQueue(queue);
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em Q\+U\+E\+U\+E-\/\+E\+R\+R\+OR} & the Queue passed has a maximum size set\\
\hline
\end{DoxyExceptions}
\begin{DoxySeeAlso}{See also}
event\+\_\+handling for more information 
\end{DoxySeeAlso}
\mbox{\Hypertarget{class_qore_1_1_ftp_client_a653ffafc1bd4b8da05f9ce18cc7fe854}\label{class_qore_1_1_ftp_client_a653ffafc1bd4b8da05f9ce18cc7fe854}} 
\index{Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}!set\+Data\+Event\+Queue@{set\+Data\+Event\+Queue}}
\index{set\+Data\+Event\+Queue@{set\+Data\+Event\+Queue}!Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}}
\subsubsection{\texorpdfstring{set\+Data\+Event\+Queue()}{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 \hyperlink{class_qore_1_1_ftp_client}{Ftp\+Client} object so that \hyperlink{event_handling}{I/O events} are no longer captured on the object on the data connection. 

\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
ftp.setDataEventQueue();
\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_ftp_client_a46177b721d9b98eda4d9769fe85f543f}\label{class_qore_1_1_ftp_client_a46177b721d9b98eda4d9769fe85f543f}} 
\index{Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}!set\+Data\+Event\+Queue@{set\+Data\+Event\+Queue}}
\index{set\+Data\+Event\+Queue@{set\+Data\+Event\+Queue}!Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}}
\subsubsection{\texorpdfstring{set\+Data\+Event\+Queue()}{setDataEventQueue()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily nothing Qore\+::\+Ftp\+Client\+::set\+Data\+Event\+Queue (\begin{DoxyParamCaption}\item[{\hyperlink{class_qore_1_1_thread_1_1_queue}{Qore\+::\+Thread\+::\+Queue}}]{queue }\end{DoxyParamCaption})}



Sets a Queue object to receive \hyperlink{class_qore_1_1_ftp_client}{Ftp\+Client} and \hyperlink{class_qore_1_1_socket}{Socket} events on the data connection. 


\begin{DoxyParams}{Parameters}
{\em queue} & a \hyperlink{class_qore_1_1_thread_1_1_queue}{Queue} object to receive \hyperlink{class_qore_1_1_ftp_client}{Ftp\+Client} and \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 Q\+U\+E\+U\+E-\/\+E\+R\+R\+OR will be thrown\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
ftp.setDataEventQueue(queue);
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em Q\+U\+E\+U\+E-\/\+E\+R\+R\+OR} & the Queue passed has a maximum size set\\
\hline
\end{DoxyExceptions}
\begin{DoxySeeAlso}{See also}
event\+\_\+handling for more information 
\end{DoxySeeAlso}
\mbox{\Hypertarget{class_qore_1_1_ftp_client_a105c9076a7dd0e0cd58b0a562545cb77}\label{class_qore_1_1_ftp_client_a105c9076a7dd0e0cd58b0a562545cb77}} 
\index{Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}!set\+Event\+Queue@{set\+Event\+Queue}}
\index{set\+Event\+Queue@{set\+Event\+Queue}!Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}}
\subsubsection{\texorpdfstring{set\+Event\+Queue()}{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 \hyperlink{class_qore_1_1_ftp_client}{Ftp\+Client} object so that \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}
ftp.setEventQueue();
\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_ftp_client_a5f72b24438d935667605f619c54789b3}\label{class_qore_1_1_ftp_client_a5f72b24438d935667605f619c54789b3}} 
\index{Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}!set\+Event\+Queue@{set\+Event\+Queue}}
\index{set\+Event\+Queue@{set\+Event\+Queue}!Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}}
\subsubsection{\texorpdfstring{set\+Event\+Queue()}{setEventQueue()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily nothing Qore\+::\+Ftp\+Client\+::set\+Event\+Queue (\begin{DoxyParamCaption}\item[{\hyperlink{class_qore_1_1_thread_1_1_queue}{Qore\+::\+Thread\+::\+Queue}}]{queue }\end{DoxyParamCaption})}



Sets a Queue object to receive \hyperlink{class_qore_1_1_ftp_client}{Ftp\+Client} and \hyperlink{class_qore_1_1_socket}{Socket} events on both the data and control connections. 


\begin{DoxyParams}{Parameters}
{\em queue} & a \hyperlink{class_qore_1_1_thread_1_1_queue}{Queue} object to receive \hyperlink{class_qore_1_1_ftp_client}{Ftp\+Client} and \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 Q\+U\+E\+U\+E-\/\+E\+R\+R\+OR will be thrown\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
ftp.setEventQueue(queue);
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em Q\+U\+E\+U\+E-\/\+E\+R\+R\+OR} & the Queue passed has a maximum size set\\
\hline
\end{DoxyExceptions}
\begin{DoxySeeAlso}{See also}
event\+\_\+handling for more information 
\end{DoxySeeAlso}
\mbox{\Hypertarget{class_qore_1_1_ftp_client_ab32919fb108c2ccfd9b7c7f019c643b2}\label{class_qore_1_1_ftp_client_ab32919fb108c2ccfd9b7c7f019c643b2}} 
\index{Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}!set\+Host\+Name@{set\+Host\+Name}}
\index{set\+Host\+Name@{set\+Host\+Name}!Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}}
\subsubsection{\texorpdfstring{set\+Host\+Name()}{setHostName()}}
{\footnotesize\ttfamily nothing Qore\+::\+Ftp\+Client\+::set\+Host\+Name (\begin{DoxyParamCaption}\item[{\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}
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\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}!set\+Insecure@{set\+Insecure}}
\index{set\+Insecure@{set\+Insecure}!Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}}
\subsubsection{\texorpdfstring{set\+Insecure()}{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}
ftp.setInsecure();
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em S\+E\+T-\/\+I\+N\+S\+E\+C\+U\+R\+E-\/\+E\+R\+R\+OR} & 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\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}!set\+Insecure\+Data@{set\+Insecure\+Data}}
\index{set\+Insecure\+Data@{set\+Insecure\+Data}!Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}}
\subsubsection{\texorpdfstring{set\+Insecure\+Data()}{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}
ftp.setSecure();
ftp.setInsecureData();
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em S\+E\+T-\/\+I\+N\+S\+E\+C\+U\+R\+E\+D\+A\+T\+A-\/\+E\+R\+R\+OR} & 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\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}!set\+Mode\+Auto@{set\+Mode\+Auto}}
\index{set\+Mode\+Auto@{set\+Mode\+Auto}!Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}}
\subsubsection{\texorpdfstring{set\+Mode\+Auto()}{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 E\+P\+SV}, {\ttfamily P\+A\+SV}, and {\ttfamily P\+O\+RT} modes, in that order. 

\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
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\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}!set\+Mode\+E\+P\+SV@{set\+Mode\+E\+P\+SV}}
\index{set\+Mode\+E\+P\+SV@{set\+Mode\+E\+P\+SV}!Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}}
\subsubsection{\texorpdfstring{set\+Mode\+E\+P\+S\+V()}{setModeEPSV()}}
{\footnotesize\ttfamily nothing Qore\+::\+Ftp\+Client\+::set\+Mode\+E\+P\+SV (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Sets the object to only try to make data connections using {\ttfamily E\+P\+SV} (\href{http://tools.ietf.org/html/rfc2428}{\tt R\+F\+C-\/2428} extended passive) mode. 

\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
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\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}!set\+Mode\+P\+A\+SV@{set\+Mode\+P\+A\+SV}}
\index{set\+Mode\+P\+A\+SV@{set\+Mode\+P\+A\+SV}!Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}}
\subsubsection{\texorpdfstring{set\+Mode\+P\+A\+S\+V()}{setModePASV()}}
{\footnotesize\ttfamily nothing Qore\+::\+Ftp\+Client\+::set\+Mode\+P\+A\+SV (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Sets the object to only try to make data connections using {\ttfamily P\+A\+SV} (\href{http://tools.ietf.org/html/rfc959}{\tt R\+F\+C-\/959} passive) mode. 

\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
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\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}!set\+Mode\+P\+O\+RT@{set\+Mode\+P\+O\+RT}}
\index{set\+Mode\+P\+O\+RT@{set\+Mode\+P\+O\+RT}!Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}}
\subsubsection{\texorpdfstring{set\+Mode\+P\+O\+R\+T()}{setModePORT()}}
{\footnotesize\ttfamily nothing Qore\+::\+Ftp\+Client\+::set\+Mode\+P\+O\+RT (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Sets the object to only try to make data connections using {\ttfamily P\+O\+RT} mode. 

\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
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\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}!set\+Network\+Family@{set\+Network\+Family}}
\index{set\+Network\+Family@{set\+Network\+Family}!Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}}
\subsubsection{\texorpdfstring{set\+Network\+Family()}{setNetworkFamily()}}
{\footnotesize\ttfamily nothing Qore\+::\+Ftp\+Client\+::set\+Network\+Family (\begin{DoxyParamCaption}\item[{\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 I\+Pv4 or I\+Pv6 connections. 


\begin{DoxyParams}{Parameters}
{\em family} & the network address family to use for new connections; see \hyperlink{group__network__address__family__constants}{Network Address Family Constants} for valid values; use \hyperlink{group__network__address__family__constants_gac4f81abe9d374562b41117c51950fb80}{Qore\+::\+A\+F\+\_\+\+U\+N\+S\+P\+EC} to automatically choose the family (the default)\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
ftp.setNetworkFamily(AF\_INET);
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em F\+T\+P\+C\+L\+I\+E\+N\+T-\/\+S\+E\+T\+N\+E\+T\+W\+O\+R\+K\+F\+A\+M\+I\+L\+Y-\/\+E\+R\+R\+OR} & 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\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}!set\+Password@{set\+Password}}
\index{set\+Password@{set\+Password}!Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}}
\subsubsection{\texorpdfstring{set\+Password()}{setPassword()}}
{\footnotesize\ttfamily nothing Qore\+::\+Ftp\+Client\+::set\+Password (\begin{DoxyParamCaption}\item[{\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}
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\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}!set\+Port@{set\+Port}}
\index{set\+Port@{set\+Port}!Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}}
\subsubsection{\texorpdfstring{set\+Port()}{setPort()}}
{\footnotesize\ttfamily nothing Qore\+::\+Ftp\+Client\+::set\+Port (\begin{DoxyParamCaption}\item[{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}}]{port }\end{DoxyParamCaption})}



Sets the control port value to use for the next connection (the F\+TP protocol default is 21) 


\begin{DoxyParams}{Parameters}
{\em port} & the control port value to use for the next connection (the F\+TP protocol default is 21); must be $>$ 0 or an F\+T\+P\+C\+L\+I\+E\+N\+T-\/\+S\+E\+T\+P\+O\+R\+T-\/\+P\+A\+R\+A\+M\+E\+T\+E\+R-\/\+E\+R\+R\+OR exception is raised\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
ftp.setPort(2021);
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em F\+T\+P\+C\+L\+I\+E\+N\+T-\/\+S\+E\+T\+P\+O\+R\+T-\/\+P\+A\+R\+A\+M\+E\+T\+E\+R-\/\+E\+R\+R\+OR} & 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\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}!set\+Secure@{set\+Secure}}
\index{set\+Secure@{set\+Secure}!Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}}
\subsubsection{\texorpdfstring{set\+Secure()}{setSecure()}}
{\footnotesize\ttfamily nothing Qore\+::\+Ftp\+Client\+::set\+Secure (\begin{DoxyParamCaption}\item[{bool}]{secure = {\ttfamily \hyperlink{group__boolean__constants_ga3ba2df91713a6249449347131ea526c3}{True}} }\end{DoxyParamCaption})}



Make an F\+T\+PS connection to the server on the next connect if the argument is \hyperlink{group__boolean__constants_ga3ba2df91713a6249449347131ea526c3}{True}. 


\begin{DoxyParams}{Parameters}
{\em secure} & Make an F\+T\+PS connection to the server on the next connect if the argument is \hyperlink{group__boolean__constants_ga3ba2df91713a6249449347131ea526c3}{True}; make a cleartext connection if the argument is \hyperlink{group__boolean__constants_ga9da2b9a8003cd3788e48305f8a00540f}{False}\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
ftp.setSecure(\textcolor{keyword}{True});
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em S\+E\+T-\/\+S\+E\+C\+U\+R\+E-\/\+E\+R\+R\+OR} & 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\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}!set\+Timeout@{set\+Timeout}}
\index{set\+Timeout@{set\+Timeout}!Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}}
\subsubsection{\texorpdfstring{set\+Timeout()}{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\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}!set\+U\+RL@{set\+U\+RL}}
\index{set\+U\+RL@{set\+U\+RL}!Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}}
\subsubsection{\texorpdfstring{set\+U\+R\+L()}{setURL()}}
{\footnotesize\ttfamily nothing Qore\+::\+Ftp\+Client\+::set\+U\+RL (\begin{DoxyParamCaption}\item[{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}]{url }\end{DoxyParamCaption})}



Sets the connection and login parameters based on the U\+RL 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 U\+RL to use for the next connection; the U\+RL must contain at least a hostname\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
ftp.setURL(\textcolor{stringliteral}{"ftps://user:pass@example.com:2021"});
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em U\+N\+S\+U\+P\+P\+O\+R\+T\+E\+D-\/\+P\+R\+O\+T\+O\+C\+OL} & Only {\ttfamily \char`\"{}ftp\char`\"{}} and \char`\"{}ftps\char`\"{} are allowed as the protocol (scheme) in the U\+RL \\
\hline
{\em F\+T\+P-\/\+U\+R\+L-\/\+E\+R\+R\+OR} & No hostname given in the U\+RL \\
\hline
\end{DoxyExceptions}
\mbox{\Hypertarget{class_qore_1_1_ftp_client_a15efd0f6d729a01eb39ca0a53a200c73}\label{class_qore_1_1_ftp_client_a15efd0f6d729a01eb39ca0a53a200c73}} 
\index{Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}!set\+User\+Name@{set\+User\+Name}}
\index{set\+User\+Name@{set\+User\+Name}!Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}}
\subsubsection{\texorpdfstring{set\+User\+Name()}{setUserName()}}
{\footnotesize\ttfamily nothing Qore\+::\+Ftp\+Client\+::set\+User\+Name (\begin{DoxyParamCaption}\item[{\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}
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\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}!set\+Warning\+Queue@{set\+Warning\+Queue}}
\index{set\+Warning\+Queue@{set\+Warning\+Queue}!Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}}
\subsubsection{\texorpdfstring{set\+Warning\+Queue()}{setWarningQueue()}}
{\footnotesize\ttfamily nothing Qore\+::\+Ftp\+Client\+::set\+Warning\+Queue (\begin{DoxyParamCaption}\item[{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}}]{warning\+\_\+ms,  }\item[{\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 \hyperlink{class_qore_1_1_thread_1_1_queue}{Queue} object to receive socket warnings. 

\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
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`\"{}\+S\+O\+C\+K\+E\+T-\/\+O\+P\+E\+R\+A\+T\+I\+O\+N-\/\+W\+A\+R\+N\+I\+N\+G\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 \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`\"{}\+S\+O\+C\+K\+E\+T-\/\+T\+H\+R\+O\+U\+G\+H\+P\+U\+T-\/\+W\+A\+R\+N\+I\+N\+G\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 \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 \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 Q\+U\+E\+U\+E-\/\+E\+R\+R\+OR} & the Queue passed has a maximum size set \\
\hline
{\em S\+O\+C\+K\+E\+T-\/\+S\+E\+T\+W\+A\+R\+N\+I\+N\+G\+Q\+U\+E\+U\+E-\/\+E\+R\+R\+OR} & at least one of {\itshape warning\+\_\+ms} and {\itshape warning\+\_\+bs} must be $>$ 0\\
\hline
\end{DoxyExceptions}
\begin{DoxySeeAlso}{See also}
\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\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}!verify\+Peer\+Certificate@{verify\+Peer\+Certificate}}
\index{verify\+Peer\+Certificate@{verify\+Peer\+Certificate}!Qore\+::\+Ftp\+Client@{Qore\+::\+Ftp\+Client}}
\subsubsection{\texorpdfstring{verify\+Peer\+Certificate()}{verifyPeerCertificate()}}
{\footnotesize\ttfamily \+\_\+\+\_\+7\+\_\+ \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 \hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG} if an encrypted connection is not established. 

\begin{DoxyReturn}{Returns}
A string code giving the result of verifying the peer\textquotesingle{}s certificate or \hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG} if a secure connection has not been established. The possible values are found in the keys of the \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\+:}
\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
\textcolor{keywordflow}{if} (ftp.isSecure() && (*string str = ftp.verifyPeerCertificate())) \{
    \hyperlink{group__string__functions_ga32070517a9f8a70a32ef48f83a6f128e}{printf}(\textcolor{stringliteral}{"certificate: %s: %s\(\backslash\)n"}, str, X509\_VerificationReasons\{str\});
\end{DoxyCode}
 
\end{DoxyParagraph}
