Method FTPClient():get() Professional

Retrieves the contents of a file located on the FTP server.

:get( <cFilename> ) --> cContents | NIL
The parameter is a character string holding the name of the file whose contents should be retrieved from the FTP server. <cFilename> must include the file name plus path information relative to the current directory on the server. Alternatively, the path may be specified as an absolute path.

The method returns the contents of the specified file as a character string or NIL when the operation fails.


This method downloads the contents of a file located on the FTP server to the client computer. When a connection to the FTP server does not exist, an attempt to establish a connection is made. The file contents is then transferred to the client. Note that the method does not create a local copy of the file, only the file contents is retrieved. If required, the contents must explicitly be written to a local file.


If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.