\JClientFtp
FTP client class
Synopsis
class JClientFtp
{
- // members
- private $_conn;
- private $_dataconn;
- private $_pasv;
- private $_response;
- private $_timeout;
- private $_type;
- private $_autoAscii;
- private $_lineEndings;
- protected $instances;
- // methods
- public void __construct()
- public void __destruct()
- public static JClientFtp getInstance()
- public boolean setOptions()
- public boolean connect()
- public boolean isConnected()
- public boolean login()
- public boolean quit()
- public string pwd()
- public string syst()
- public boolean chdir()
- public boolean reinit()
- public boolean rename()
- public boolean chmod()
- public boolean delete()
- public boolean mkdir()
- public boolean restart()
- public boolean create()
- public boolean read()
- public boolean get()
- public boolean store()
- public boolean write()
- public string listNames()
- public mixed listDetails()
- protected boolean _putCmd()
- protected boolean _verifyResponse()
- protected boolean _passive()
- protected integer _findMode()
- protected boolean _mode()
Hierarchy
Extended by
Tasks
Tasks
Line | Task |
---|---|
1318 | Deal with recurse -- nightmare |
Members
private
- $_autoAscii — array
- $_conn — resource
- $_dataconn — resource
- $_lineEndings
—
array
Array to hold native line ending characters - $_pasv — array
- $_response — string
- $_timeout — integer
- $_type — integer
protected
- $instances — array
Methods
protected
- _findMode() — Method to find out the correct transfer mode for a specific file
- _mode() — Set transfer mode
- _passive() — Set server to passive mode and open a data port connection
- _putCmd() — Send command to the FTP server and validate an expected response code
- _verifyResponse() — Verify the response code from the server and log response if flag is set
public
- __construct() — JClientFtp object constructor
- __destruct() — JClientFtp object destructor
- chdir() — Method to change the current working directory on the FTP server
- chmod() — Method to change mode for a path on the FTP server
- connect() — Method to connect to a FTP server
- create() — Method to create an empty file on the FTP server
- delete() — Method to delete a path [file/folder] on the FTP server
- get() — Method to get a file from the FTP server and save it to a local file
- getInstance() — Returns the global FTP connector object, only creating it if it doesn't already exist.
- isConnected() — Method to determine if the object is connected to an FTP server
- listDetails() — Method to list the contents of a directory on the FTP server
- listNames() — Method to list the filenames of the contents of a directory on the FTP server
- login() — Method to login to a server once connected
- mkdir() — Method to create a directory on the FTP server
- pwd() — Method to retrieve the current working directory on the FTP server
- quit() — Method to quit and close the connection
- read() — Method to read a file from the FTP server's contents into a buffer
- reinit() — Method to reinitialise the server, ie. need to login again
- rename() — Method to rename a file/folder on the FTP server
- restart() — Method to restart data transfer at a given byte
- setOptions() — Set client options
- store() — Method to store a file to the FTP server
- syst() — Method to system string from the FTP server
- write() — Method to write a string to the FTP server