JFTP: Difference between revisions
From Joomla! Documentation
m clean up |
m preparing for archive only |
||
| Line 86: | Line 86: | ||
===Examples=== | ===Examples=== | ||
=== Code Examples === | |||
<dpl> | <dpl> | ||
noresultsheader=\n | noresultsheader=\n | ||
category=JFTP | category=JFTP | ||
namespace=CodeExample | |||
category=ClassExample | category=ClassExample | ||
include=* | include=* | ||
format= ,,, | format= ,,, | ||
</dpl> | </dpl> | ||
Latest revision as of 01:37, 25 March 2017
JFTP is an FTP client class, that allows you to connect and interact with an FTP server.
Defined in
libraries/joomla/client/ftp.php
Methods
| Method name | Description |
|---|---|
| __construct | JFTP object constructor |
| __destruct | JFTP object destructor |
| getInstance | Returns the global FTP connector object, only creating it if it doesn't already exist. |
| setOptions | Set client options |
| connect | Method to connect to a FTP server |
| isConnected | Method to determine if the object is connected to an FTP server |
| login | Method to login to a server once connected |
| quit | Method to quit and close the connection |
| pwd | Method to retrieve the current working directory on the FTP server |
| syst | Method to system string from the FTP server |
| chdir | Method to change the current working directory on the FTP server |
| reinit | Method to reinitialise the server, ie. need to login again |
| rename | Method to rename a file/folder on the FTP server |
| chmod | Method to change mode for a path on the FTP server |
| delete | Method to delete a path [file/folder] on the FTP server |
| mkdir | Method to create a directory on the FTP server |
| restart | Method to restart data transfer at a given byte |
| create | Method to create an empty file on the FTP server |
| read | Method to read a file from the FTP server's contents into a buffer |
| get | Method to get a file from the FTP server and save it to a local file |
| store | Method to store a file to the FTP server |
| write | Method to write a string to the FTP server |
| listNames | Method to list the filenames of the contents of a directory on the FTP server |
| listDetails | Method to list the contents of a directory on the FTP server |
Importing
jimport( 'joomla.client.ftp' );
This example was originally contributed by User:Batch1211.