Qore Programming Language Reference Manual  0.8.8
 All Classes Namespaces Functions Variables Groups Pages
QC_FtpClient.dox.h
1 namespace Qore {
4 
76 class FtpClient {
77 
78 public:
80 
97 nothing connect();
98 
99 public:
101 
106  constructor();
107 
108 public:
110 
122  constructor(string url);
123 
124 public:
126 
128  copy();
129 
130 public:
132 
145 nothing cwd(string path);
146 
147 public:
149 
164 nothing del(string remote_path);
165 
166 public:
168 
176  destructor();
177 
178 public:
180 
188 nothing disconnect();
189 
190 public:
192 
214 nothing get(string remote_path, *string local_path);
215 
216 public:
218 
238 binary getAsBinary(string remote_path);
239 
240 public:
242 
262 string getAsString(string remote_path);
263 
264 public:
266 
273 *string getHostName();
274 
275 public:
277 
284 *string getPassword();
285 
286 public:
288 
295 int getPort();
296 
297 public:
299 
310 *string getSSLCipherName();
311 
312 public:
314 
325 *string getSSLCipherVersion();
326 
327 public:
329 
336 string getURL();
337 
338 public:
340 
347 *string getUserName();
348 
349 public:
351 
362 bool isDataSecure();
363 
364 public:
366 
376 bool isSecure();
377 
378 public:
380 
397 *string list();
398 
399 public:
401 
420 *string list(string path);
421 
422 public:
424 
439 nothing mkdir(string remote_path);
440 
441 public:
443 
460 *string nlst();
461 
462 public:
464 
483 *string nlst(string path);
484 
485 public:
487 
510 nothing put(string local_path, *string remote_path);
511 
512 public:
514 
530 nothing putData(string data, string remote_path);
531 
532 public:
534 
550 nothing putData(binary data, string remote_path);
551 
552 public:
554 
569 string pwd();
570 
571 public:
573 
589 nothing rename(string from, string to);
590 
591 public:
593 
608 nothing rmdir(string remote_path);
609 
610 public:
612 
617 nothing setControlEventQueue();
618 
619 public:
621 
633 
634 public:
636 
641 nothing setDataEventQueue();
642 
643 public:
645 
657 
658 public:
660 
665 nothing setEventQueue();
666 
667 public:
669 
680 nothing setEventQueue(Qore::Thread::Queue queue);
681 
682 public:
684 
691 nothing setHostName(string host);
692 
693 public:
695 
702 nothing setInsecure();
703 
704 public:
706 
714 nothing setInsecureData();
715 
716 public:
718 
723 nothing setModeAuto();
724 
725 public:
727 
732 nothing setModeEPSV();
733 
734 public:
736 
741 nothing setModePASV();
742 
743 public:
745 
750 nothing setModePORT();
751 
752 public:
754 
761 nothing setPassword(string pass);
762 
763 public:
765 
774 nothing setPort(int port);
775 
776 public:
778 
787 nothing setSecure(bool secure = True);
788 
789 public:
791 
803 nothing setURL(string url);
804 
805 public:
807 
814 nothing setUserName(string user);
815 
816 public:
818 
829 *string verifyPeerCertificate();
830 };
831 };
nothing setControlEventQueue()
Clears any Queue object that may be set on the FtpClient object so that I/O events are no longer capt...
string getURL()
Retrieves the current connection URL string for this object.
copy()
Throws an exception to prevent copying of objects this class.
nothing setModeEPSV()
Sets the object to only try to make data connections using EPSV (RFC-2428 extended passive) mode...
*string nlst()
Returns a list of file names from the FTP server in the current working directory or NOTHING if the p...
nothing disconnect()
Disconnects from an FTP server.
nothing setHostName(string host)
Sets the hostname or address to use to connect to for the next connection.
nothing setModePASV()
Sets the object to only try to make data connections using PASV (RFC-959 passive) mode...
const True
logical True
Definition: qc_qore.dox.h:94
nothing setSecure(bool secure=True)
Make an FTPS connection to the server on the next connect if the argument is True.
*string getSSLCipherVersion()
Returns the version of the cipher for an encrypted connection or NOTHING if an encrypted connection i...
binary binary()
Always returns an empty binary object (of zero length)
The FtpClient class allows Qore code to communicate with FTP servers with the FTP and FTPS protocols...
Definition: QC_FtpClient.dox.h:76
*string getSSLCipherName()
Returns the name of the cipher for an encrypted connection or NOTHING if an encrypted connection is n...
nothing rmdir(string remote_path)
Removes a directory on the remote FTP server; if any errors occur, an exception is thrown...
nothing setEventQueue()
Clears any Queue object that may be set on the FtpClient object so that I/O events are no longer capt...
nothing connect()
Connects to the FTP server and attempts a login; if any errors occur, an exception is thrown...
nothing setModePORT()
Sets the object to only try to make data connections using PORT mode.
string pwd()
Returns the server-side current working directory.
*string list()
Returns a list of files from the FTP server in the server's long format in the current working direct...
*string verifyPeerCertificate()
Returns a string code giving the result of verifying the remote certificate or NOTHING if an encrypte...
*string getPassword()
Returns the current password value or NOTHING if none is set.
nothing setUserName(string user)
Sets the user name to use for the next connection.
nothing setURL(string url)
Sets the connection and login parameters based on the URL passed as an argument.
binary getAsBinary(string remote_path)
Gets a file from the FTP server and returns it as a binary.
nothing setPassword(string pass)
Sets the password to use for the next connection.
int getPort()
Retrieves the current connection port value for this object.
nothing mkdir(string remote_path)
Creates a directory on the FTP server; if any errors occur, an exception is thrown.
bool isSecure()
Returns True if the control connection is a secure TLS/SSL connection, False if not.
nothing setPort(int port)
Sets the control port value to use for the next connection (the FTP protocol default is 21) ...
string getAsString(string remote_path)
Gets a file from the FTP server and returns it as a string.
Queue objects provide a blocking, thread-safe message-passing object to Qore programs ...
Definition: QC_Queue.dox.h:13
destructor()
Disconnects any remote connection and destroys the object.
nothing setModeAuto()
Sets the object to automatically try to negotiate the data connections in EPSV, PASV, and PORT modes, in that order.
nothing putData(string data, string remote_path)
Transfers string data to the FTP server and saves it as a file on the remote machine; if any errors o...
constructor()
Creates an empty FtpClient object.
nothing setInsecureData()
Make a non-encrypted data connection to the server on the next connect even if the control connection...
*string getHostName()
Returns the current hostname value or NOTHING if none is set.
nothing setDataEventQueue()
Clears any Queue object that may be set on the FtpClient object so that I/O events are no longer capt...
bool isDataSecure()
Returns True if the data connections are secure TLS/SSL connections, False if not.
nothing cwd(string path)
Changes the current working directory on the server.
nothing del(string remote_path)
Deletes a file from the FTP server; if any errors occur, an exception is thrown.
nothing rename(string from, string to)
Renames/moves a file or directory; if any errors occur, an exception is thrown.
nothing put(string local_path, *string remote_path)
Transfers a local file to the FTP server; if any errors occur, an exception is thrown.
nothing setInsecure()
Make a non-encrypted connection to the server on the next connect.
*string getUserName()
Returns the current username value or NOTHING if none is set.