 |
Qore Programming Language Reference Manual
0.9.10
|
212 nothing
del(
string remote_path);
264 nothing
get(
string remote_path, *
string local_path);
730 nothing
put(
string local_path, *
string remote_path);
774 nothing
putData(
string data,
string remote_path);
1142 nothing
setWarningQueue(
int warning_ms,
int warning_bs, Queue queue,
auto arg, timeout min_ms = 1s);
bool isSecure()
Returns True if the control connection is a secure TLS/SSL connection, False if not.
*string getHostName()
Returns the current hostname value or NOTHING if none is set.
nothing setNetworkFamily(int family)
Sets the network address family to use for new connections; use this method to restrict connections t...
nothing del(string remote_path)
Deletes a file from the FTP server; if any errors occur, an exception is thrown.
hash< auto > getDataPeerInfo(bool host_lookup=True)
Returns information about the remote data socket as a hash.
The FtpClient class allows Qore code to communicate with FTP servers with the FTP and FTPS protocols.
Definition: QC_FtpClient.dox.h:98
int getPort()
Retrieves the current connection port value for this object.
nothing setPassword(string pass)
Sets the password to use for the next connection.
nothing clearWarningQueue()
Removes any warning Queue object from the Socket.
nothing setDataEventQueue()
Clears any Queue object that may be set on the FtpClient object so that I/O events are no longer capt...
hash< FtpResponseInfo > sendControlMessage(string cmd, string arg)
Sends a message on the control connection with a reply on the control connection only.
*string nlst(string path)
Returns a list of file names from the FTP server for the given path or NOTHING if the path cannot be ...
nothing setControlEventQueue()
Clears any Queue object that may be set on the FtpClient object so that I/O events are no longer capt...
string getMode()
returns a string for the connection mode: "port", "pasv", "epsv", or "auto" if not connected and auto...
nothing setUserName(string user)
Sets the user name to use for the next connection.
binary getAsBinary(string remote_path)
Gets a file from the FTP server and returns it as a binary.
nothing put(Qore::InputStream is, string remote_path)
Transfers the content of an InputStream to the FTP server; if any errors occur, an exception is throw...
*string getPassword()
Returns the current password value or NOTHING if none is set.
nothing setSecure(bool secure=True)
Make an FTPS connection to the server on the next connect if the argument is True.
hash< auto > getControlSocketInfo(bool host_lookup=True)
Returns information about the local control socket as a hash.
nothing setInsecure()
Make a non-encrypted connection to the server on the next connect.
nothing put(string local_path, *string remote_path)
Transfers a local file to the FTP server; if any errors occur, an exception is thrown.
hash< auto > getControlPeerInfo(bool host_lookup=True)
Returns information about the remote end of the control socket as a hash.
int getTimeout()
returns the socket I/O timeout value as an integer in milliseconds
nothing setControlEventQueue(Qore::Thread::Queue queue, auto arg, *bool with_data)
Sets a Queue object to receive FtpClient and Socket events on the control connection.
const True
logical True
Definition: qc_qore.dox.h:98
nothing get(string remote_path, Qore::OutputStream os)
Gets a file from the FTP server and writes it to an OutputStream; if any errors occur,...
*string verifyPeerCertificate()
Returns a string code giving the result of verifying the remote certificate or NOTHING if an encrypte...
nothing disconnect()
Disconnects from an FTP server.
Queue objects provide a blocking, thread-safe message-passing object to Qore programs
Definition: QC_Queue.dox.h:22
nothing setHostName(string host)
Sets the hostname or address to use to connect to for the next connection.
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,...
*string getSSLCipherName()
Returns the name of the cipher for an encrypted connection or NOTHING if an encrypted connection is n...
constructor()
Creates an empty FtpClient object.
This class defines an abstract interface for output streams.
Definition: QC_OutputStream.dox.h:18
constructor(string url)
Creates an FtpClient object and initializes it with a URL.
nothing setModeEPSV()
Sets the object to only try to make data connections using EPSV (RFC-2428 extended passive) mode.
string msg
The response message string.
Definition: QC_FtpClient.dox.h:11
nothing setURL(string url)
Sets the connection and login parameters based on the URL passed as an argument.
hash getUsageInfo()
Returns performance statistics for the socket.
*string getUserName()
Returns the current username value or NOTHING if none is set.
nothing get(string remote_path, *string local_path)
Gets a file from the FTP server and stores it on the local filesystem; if any errors occur,...
nothing rmdir(string remote_path)
Removes a directory on the remote FTP server; if any errors occur, an exception is thrown.
*string nlst()
Returns a list of file names from the FTP server in the current working directory or NOTHING if the p...
nothing setDataEventQueue(Qore::Thread::Queue queue, auto arg, *bool with_data)
Sets a Queue object to receive FtpClient and Socket events on the data connection.
A hash describing a free-form FTP control response.
Definition: QC_FtpClient.dox.h:7
nothing cwd(string path)
Changes the current working directory on the server.
hash< auto > hash(object obj)
Returns a hash of an object's members.
*string getSSLCipherVersion()
Returns the version of the cipher for an encrypted connection or NOTHING if an encrypted connection i...
nothing setInsecureData()
Make a non-encrypted data connection to the server on the next connect even if the control connection...
int code
The integer response code.
Definition: QC_FtpClient.dox.h:9
bool isDataSecure()
Returns True if the data connections are secure TLS/SSL connections, False if not.
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...
nothing setPort(int port)
Sets the control port value to use for the next connection (the FTP protocol default is 21)
*string list()
Returns a list of files from the FTP server in the server's long format in the current working direct...
nothing setEventQueue(Qore::Thread::Queue queue, auto arg, *bool with_data)
Sets a Queue object to receive FtpClient and Socket events on both the data and control connections.
destructor()
Disconnects any remote connection and destroys the object.
nothing setModePASV()
Sets the object to only try to make data connections using PASV (RFC-959 passive) mode.
clearStats()
Clears performance statistics.
hash< auto > getDataSocketInfo(bool host_lookup=True)
Returns information about the local data socket as a hash.
string pwd()
Returns the server-side current working directory.
string getURL()
Retrieves the current connection URL string for this object.
setTimeout(timeout timeout_ms)
sets the socket I/O timeout value in milliseconds
int getNetworkFamily()
Returns the network address family to use for new connections.
copy()
Throws an exception to prevent copying of objects this class.
nothing setEventQueue()
Clears any Queue object that may be set on the FtpClient object so that I/O events are no longer capt...
main Qore-language namespace
Definition: Pseudo_QC_All.dox.h:3
*string list(string path)
Returns a list of files from the FTP server in the server's long format for the given path or NOTHING...
nothing mkdir(string remote_path)
Creates a directory on the FTP server; if any errors occur, an exception is thrown.
nothing connect()
Connects to the FTP server and attempts a login; if any errors occur, an exception is thrown.
string getAsString(string remote_path)
Gets a file from the FTP server and returns it as a string.
nothing rename(string from, string to)
Renames/moves a file or directory; if any errors occur, an exception is thrown.
nothing setModePORT()
Sets the object to only try to make data connections using PORT mode.
nothing putData(binary data, string remote_path)
Transfers binary data to the FTP server and saves it as a file on the remote machine; if any errors o...
binary binary()
Always returns an empty binary object (of zero length)