Qore Programming Language Reference Manual  0.8.13.6
QC_FtpClient.dox.h
1 namespace Qore {
4 
82 class FtpClient {
83 
84 public:
86 
95  clearStats();
96 
97 public:
99 
108 nothing clearWarningQueue();
109 
110 public:
112 
129 nothing connect();
130 
131 public:
133 
138  constructor();
139 
140 public:
142 
154  constructor(string url);
155 
156 public:
158 
160  copy();
161 
162 public:
164 
177 nothing cwd(string path);
178 
179 public:
181 
196 nothing del(string remote_path);
197 
198 public:
200 
208  destructor();
209 
210 public:
212 
220 nothing disconnect();
221 
222 public:
224 
248 nothing get(string remote_path, *string local_path);
249 
250 public:
252 
272 nothing get(string remote_path, Qore::OutputStream os);
273 
274 public:
276 
296 binary getAsBinary(string remote_path);
297 
298 public:
300 
320 string getAsString(string remote_path);
321 
322 public:
324 
331 *string getHostName();
332 
333 public:
335 
345 string getMode();
346 
347 public:
349 
356 *string getPassword();
357 
358 public:
360 
367 int getPort();
368 
369 public:
371 
382 *string getSSLCipherName();
383 
384 public:
386 
397 *string getSSLCipherVersion();
398 
399 public:
401 
408 int getTimeout();
409 
410 public:
412 
419 string getURL();
420 
421 public:
423 
445 
446 public:
448 
455 *string getUserName();
456 
457 public:
459 
470 bool isDataSecure();
471 
472 public:
474 
484 bool isSecure();
485 
486 public:
488 
505 *string list();
506 
507 public:
509 
528 *string list(string path);
529 
530 public:
532 
547 nothing mkdir(string remote_path);
548 
549 public:
551 
568 *string nlst();
569 
570 public:
572 
591 *string nlst(string path);
592 
593 public:
595 
618 nothing put(string local_path, *string remote_path);
619 
620 public:
622 
642 nothing put(Qore::InputStream is, string remote_path);
643 
644 public:
646 
662 nothing putData(string data, string remote_path);
663 
664 public:
666 
682 nothing putData(binary data, string remote_path);
683 
684 public:
686 
701 string pwd();
702 
703 public:
705 
721 nothing rename(string from, string to);
722 
723 public:
725 
740 nothing rmdir(string remote_path);
741 
742 public:
744 
749 nothing setControlEventQueue();
750 
751 public:
753 
765 
766 public:
768 
773 nothing setDataEventQueue();
774 
775 public:
777 
789 
790 public:
792 
797 nothing setEventQueue();
798 
799 public:
801 
812 nothing setEventQueue(Qore::Thread::Queue queue);
813 
814 public:
816 
823 nothing setHostName(string host);
824 
825 public:
827 
834 nothing setInsecure();
835 
836 public:
838 
846 nothing setInsecureData();
847 
848 public:
850 
855 nothing setModeAuto();
856 
857 public:
859 
864 nothing setModeEPSV();
865 
866 public:
868 
873 nothing setModePASV();
874 
875 public:
877 
882 nothing setModePORT();
883 
884 public:
886 
893 nothing setPassword(string pass);
894 
895 public:
897 
906 nothing setPort(int port);
907 
908 public:
910 
919 nothing setSecure(bool secure = True);
920 
921 public:
923 
927  setTimeout(timeout timeout_ms);
928 
929 public:
931 
943 nothing setURL(string url);
944 
945 public:
947 
954 nothing setUserName(string user);
955 
956 public:
958 
990 nothing setWarningQueue(int warning_ms, int warning_bs, Queue queue, auto arg, timeout min_ms = 1s);
991 
992 public:
994 
1005 *string verifyPeerCertificate();
1006 };
1007 };
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...
setTimeout(timeout timeout_ms)
sets the socket I/O timeout value in milliseconds
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:82
*string getSSLCipherName()
Returns the name of the cipher for an encrypted connection or NOTHING if an encrypted connection is n...
int getTimeout()
returns the socket I/O timeout value as an integer in milliseconds
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...
This class defines an abstract interface for output streams.
Definition: QC_OutputStream.dox.h:12
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 setWarningQueue(int warning_ms, int warning_bs, Queue queue, auto arg, timeout min_ms=1s)
Sets a Queue object to receive socket warnings.
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...
main Qore-language namespace
Definition: Pseudo_QC_All.dox.h:2
This class defines an abstract interface for input streams.
Definition: QC_InputStream.dox.h:12
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 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.