Qore Programming Language Reference Manual  0.8.12.2
 All Classes Namespaces Functions Variables Groups Pages
QC_FtpClient.dox.h
1 namespace Qore {
4 
76 class FtpClient {
77 
78 public:
80 
89  clearStats();
90 
91 public:
93 
102 nothing clearWarningQueue();
103 
104 public:
106 
123 nothing connect();
124 
125 public:
127 
132  constructor();
133 
134 public:
136 
148  constructor(string url);
149 
150 public:
152 
154  copy();
155 
156 public:
158 
171 nothing cwd(string path);
172 
173 public:
175 
190 nothing del(string remote_path);
191 
192 public:
194 
202  destructor();
203 
204 public:
206 
214 nothing disconnect();
215 
216 public:
218 
240 nothing get(string remote_path, *string local_path);
241 
242 public:
244 
264 binary getAsBinary(string remote_path);
265 
266 public:
268 
288 string getAsString(string remote_path);
289 
290 public:
292 
299 *string getHostName();
300 
301 public:
303 
313 string getMode();
314 
315 public:
317 
324 *string getPassword();
325 
326 public:
328 
335 int getPort();
336 
337 public:
339 
350 *string getSSLCipherName();
351 
352 public:
354 
365 *string getSSLCipherVersion();
366 
367 public:
369 
376 string getURL();
377 
378 public:
380 
402 
403 public:
405 
412 *string getUserName();
413 
414 public:
416 
427 bool isDataSecure();
428 
429 public:
431 
441 bool isSecure();
442 
443 public:
445 
462 *string list();
463 
464 public:
466 
485 *string list(string path);
486 
487 public:
489 
504 nothing mkdir(string remote_path);
505 
506 public:
508 
525 *string nlst();
526 
527 public:
529 
548 *string nlst(string path);
549 
550 public:
552 
575 nothing put(string local_path, *string remote_path);
576 
577 public:
579 
595 nothing putData(string data, string remote_path);
596 
597 public:
599 
615 nothing putData(binary data, string remote_path);
616 
617 public:
619 
634 string pwd();
635 
636 public:
638 
654 nothing rename(string from, string to);
655 
656 public:
658 
673 nothing rmdir(string remote_path);
674 
675 public:
677 
682 nothing setControlEventQueue();
683 
684 public:
686 
698 
699 public:
701 
706 nothing setDataEventQueue();
707 
708 public:
710 
722 
723 public:
725 
730 nothing setEventQueue();
731 
732 public:
734 
745 nothing setEventQueue(Qore::Thread::Queue queue);
746 
747 public:
749 
756 nothing setHostName(string host);
757 
758 public:
760 
767 nothing setInsecure();
768 
769 public:
771 
779 nothing setInsecureData();
780 
781 public:
783 
788 nothing setModeAuto();
789 
790 public:
792 
797 nothing setModeEPSV();
798 
799 public:
801 
806 nothing setModePASV();
807 
808 public:
810 
815 nothing setModePORT();
816 
817 public:
819 
826 nothing setPassword(string pass);
827 
828 public:
830 
839 nothing setPort(int port);
840 
841 public:
843 
852 nothing setSecure(bool secure = True);
853 
854 public:
856 
868 nothing setURL(string url);
869 
870 public:
872 
879 nothing setUserName(string user);
880 
881 public:
883 
915 nothing setWarningQueue(int warning_ms, int warning_bs, Queue queue, any arg, timeout min_ms = 1s);
916 
917 public:
919 
930 *string verifyPeerCertificate();
931 };
932 };
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 clearWarningQueue()
Removes any warning Queue object from the Socket.
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...
clearStats()
Clears performance statistics.
*string verifyPeerCertificate()
Returns a string code giving the result of verifying the remote certificate or NOTHING if an encrypte...
string getMode()
returns a string for the connection mode: "port", "pasv", "epsv", or "auto" if not connected and auto...
*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.
hash getUsageInfo()
Returns performance statistics for the socket.
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:15
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.
hash hash(object obj)
Returns a hash of an object's members.
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 setWarningQueue(int warning_ms, int warning_bs, Queue queue, any arg, timeout min_ms=1s)
Sets a Queue object to receive socket warnings.
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.