Aborts the download currently in process, returns true if ok, false if an error occurred.
Change the current FTP working directory. Returns true if successful.
Send the specified command to the FTP server. ret specifies the expected result.
Shuts down the connection, disabling further transmission and reception of data.
Connects to a server using the specified address host.
The GetList function is quite low-level. It returns the list of the files in the current directory. The list can be filtered using the wildcard string. If wildcard is empty (default), it will return all files in directory.
The form of the list can change from one peer system to another. For example, for a UNIX peer system, it will look like this:
-r--r--r-- 1 guilhem lavaux 12738 Jan 16 20:17 cmndata.cpp -r--r--r-- 1 guilhem lavaux 10866 Jan 24 16:41 config.cpp -rw-rw-rw- 1 guilhem lavaux 29967 Dec 21 19:17 cwlex_yy.c -rw-rw-rw- 1 guilhem lavaux 14342 Jan 22 19:51 cwy_tab.c -r--r--r-- 1 guilhem lavaux 13890 Jan 29 19:18 date.cpp -r--r--r-- 1 guilhem lavaux 3989 Feb 8 19:18 datstrm.cpp
But on Windows system, it will look like this:
winamp~1 exe 520196 02-25-1999 19:28 winamp204.exe 1 file(s) 520 196 bytes
This function returns the computer-parsable list of the files in the current directory (optionally only of the files matching the wildcard, all files by default). This list always has the same format and contains one full (including the directory path) file name per line.
Returns true if the given remote file exists, false otherwise.
Returns the file size in bytes or -1 if the file doesn't exist or the size couldn't be determined. Notice that this size can be approximative size only and shouldn't be used for allocating the buffer in which the remote file is copied, for example.
Creates a new input stream on the specified path. You can use all but the seek functionality of wxStream. Seek isn't available on all streams. For example, HTTP or FTP streams do not deal with it. Other functions like Tell are not available for this sort of stream, at present. You will be notified when the EOF is reached by an error.
Returns NULL if an error occurred (it could be a network failure or the fact that the file doesn't exist).
Returns the initialized stream. You will have to delete it yourself when you don't need it anymore. The destructor closes the DATA stream connection but will leave the COMMAND stream connection opened. It means that you can still send new commands without reconnecting.
Returns the last command result, i.e. the full server reply for the last command.
Sets the transfer mode. mode can be either ASCII or BINARY.
Initializes an output stream to the specified file. The returned stream has all but the seek functionality of wxStream. When the user finishes writing data, he has to delete the stream to close it.
If passive is true, passive connection to the FTP server is used. This is the default as it works with practically all firewalls. If the server doesn't support passive move, you may call this function with false argument to use active connection.
Sets the password to be sent to the FTP server to be allowed to log in.
The default value of the user name is your email address. For example, it could be "firstname.lastname@example.org". This password is built by getting the current user name and the host name of the local machine from the system.
Returns the current FTP working directory.
Rename the specified src element to dst. Returns true if successful.
Delete the file specified by path. Returns TRUE if successful.
Create the specified directory in the current FTP working directory. Returns true if successful.
Send the specified command to the FTP server and return the first character of the return code.
Sets the user name to be sent to the FTP server to be allowed to log in.
The default value of the user name is "anonymous".