wxFTP

wxFTP
Creation Parameters
Functions/Procedures
Supertopics

wxFTP

[func]
ftp_abort
( atom ftp )

Category: wxFTP

Aborts the download currently in process, returns true if ok, false if an error occurred.


wxFTP

[func]
ftp_chdir
( atom ftp, sequence path )

Category: wxFTP

Change the current FTP working directory. Returns true if successful.


wxFTP

[func]
ftp_check_command
( atom ftp, sequence command, atom ret )

Category: wxFTP

Send the specified command to the FTP server. ret specifies the expected result.


wxFTP

[func]
ftp_close
( atom ftp )

Category: wxFTP

Shuts down the connection, disabling further transmission and reception of data.


wxFTP

[func]
ftp_connect
( atom ftp, object host )

Category: wxFTP

Connects to a server using the specified address host.


wxFTP

[func]
ftp_dir
( atom ftp, sequence wildcard )

Category: wxFTP

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

wxFTP

[func]
ftp_files
( atom ftp, sequence wildcard )

Category: wxFTP

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.


wxFTP

[func]
ftp_file_exists
( atom ftp, object filename )

Category: wxFTP

Returns true if the given remote file exists, false otherwise.


wxFTP

[func]
ftp_file_size
( atom ftp, object filename )

Category: wxFTP

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.


wxFTP

[func]
ftp_input_stream
( atom ftp, sequence path )

Category: wxFTP

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.


wxFTP

[func]
ftp_last_result
( atom ftp )

Category: wxFTP

Returns the last command result, i.e. the full server reply for the last command.


wxFTP

[func]
ftp_mkdir
( atom ftp, sequence path )

Category: wxFTP


wxFTP

[proc]
ftp_mode
( atom ftp, integer mode )

Category: wxFTP

Sets the transfer mode. mode can be either ASCII or BINARY.


wxFTP

[func]
ftp_output_stream
( atom ftp, sequence path )

Category: wxFTP

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.


wxFTP

[proc]
ftp_passive
( atom ftp, atom passive )

Category: wxFTP

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.


wxFTP

[proc]
ftp_password
( atom ftp, sequence pwd )

Category: wxFTP

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 "username@userhost.domain". This password is built by getting the current user name and the host name of the local machine from the system.


wxFTP

[proc]
ftp_pwd
( atom ftp )

Category: wxFTP

Returns the current FTP working directory.


wxFTP

[func]
ftp_rename
( atom ftp, sequence source, sequence dest )

Category: wxFTP

Rename the specified src element to dst. Returns true if successful.


wxFTP

[func]
ftp_rm
( atom ftp, sequence path )

Category: wxFTP

Delete the file specified by path. Returns TRUE if successful.


wxFTP

[func]
ftp_rmdir
( atom ftp, sequence path )

Category: wxFTP

Create the specified directory in the current FTP working directory. Returns true if successful.


wxFTP

[func]
ftp_send_command
( atom ftp, sequence command )

Category: wxFTP

Send the specified command to the FTP server and return the first character of the return code.


wxFTP

[proc]
ftp_user
( atom ftp, sequence user )

Category: wxFTP

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".