FtpClient
class FtpClient
FTP client class
Methods
FtpClient object constructor
FtpClient object destructor
Returns the global FTP connector object, only creating it if it doesn't already exist.
Set client options
Method to connect to a FTP server
Method to determine if the object is connected to an FTP server
Method to login to a server once connected
Method to quit and close the connection
Method to retrieve the current working directory on the FTP server
Method to system string from the FTP server
Method to change the current working directory on the FTP server
Method to reinitialise the server, ie. need to login again
Method to rename a file/folder on the FTP server
Method to change mode for a path on the FTP server
Method to delete a path [file/folder] on the FTP server
Method to create a directory on the FTP server
Method to restart data transfer at a given byte
Method to create an empty file on the FTP server
Method to read a file from the FTP server's contents into a buffer
Method to get a file from the FTP server and save it to a local file
Method to store a file to the FTP server
Method to write a string to the FTP server
Method to append a string to the FTP server
Get the size of the remote file.
Method to list the filenames of the contents of a directory on the FTP server
Method to list the contents of a directory on the FTP server
Details
static
FtpClient
getInstance(
string $host = '127.0.0.1',
string $port = '21',
array $options = array(),
string $user = null,
string $pass = null)
Returns the global FTP connector object, only creating it if it doesn't already exist.
You may optionally specify a username and password in the parameters. If you do so, you may not login() again with different credentials using the same object. If you do not use this option, you must quit() the current connection when you are done, to free it for use by others.
boolean
login(
string $user = 'anonymous',
string $pass = 'jftp@joomla.org')
Method to login to a server once connected
boolean
reinit()
Method to reinitialise the server, ie. need to login again
NOTE: This command not available on all servers
boolean
read(
string $remote,
string $buffer)
Method to read a file from the FTP server's contents into a buffer
boolean
get(
string $local,
string $remote)
Method to get a file from the FTP server and save it to a local file