JFTP
FTP client class
Located in /joomla/client/ftp.php (line 61)
JObject (Subpackage Base) JFTP (Subpackage Client)
JFTP object constructor
- array $options: Associative array of options to set
- JObject::__construct()
- Class constructor, overridden in descendant classes.
JFTP object destructor
Closes an existing connection, if we have one
Method to change the current working directory on the FTP server
- string $path: Path to change into on the server
Method to change mode for a path on the FTP server
- string $path: Path to change mode on
- string/int $mode: Octal value to change mode to, e.g. '0777', 0777 or 511
Method to connect to a FTP server
- string $host: Host to connect to [Default: 127.0.0.1]
- string $port: Port to connect on [Default: port 21]
Method to create an empty file on the FTP server
- string $path: Path local file to store on the FTP server
Method to delete a path [file/folder] on the FTP server
- string $path: Path to delete
Method to get a file from the FTP server and save it to a local file
- string $local: Path to local file to save remote file as
- string $remote: Path to remote file to get on the FTP server
- JObject::get()
- Returns a property of the object or the default value if the property is not set.
Returns a reference to the global FTP connector object, only creating it if it doesn't already exist.
This method must be invoked as:
$ftp = &JFTP::getInstance($host);
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.
- string $host: Host to connect to
- string $port: Port to connect to
- array $options: Array with any of these options: type=>[FTP_AUTOASCII|FTP_ASCII|FTP_BINARY], timeout=>(int)
- string $user: Username to use for a connection
- string $pass: Password to use for a connection
Method to determine if the object is connected to an FTP server
Method to list the contents of a directory on the FTP server
- string $path: Path local file to store on the FTP server
- string $type: Return type [raw|all|folders|files]
- boolean $search: Recursively search subdirectories
Method to list the file/folder names of the contents of a directory on the FTP server
- string $path: Path local file to store on the FTP server
Method to login to a server once connected
- string $user: Username to login to the server
- string $pass: Password to login to the server
Method to create a directory on the FTP server
- string $path: Directory to create
Method to read a file from the FTP server's contents into a buffer
- string $remote: Path to remote file to read on the FTP server
- string $buffer: Buffer variable to read file contents into
- &$buffer
Method to reinitialize the server, ie. need to login again
NOTE: This command not available on all servers
Method to rename a file/folder on the FTP server
- string $from: Path to change file/folder from
- string $to: Path to change file/folder to
Method to restart data transfer at a given byte
- int $point: Byte to restart transfer at
Set client options
- array $options: Associative array of options to set
Method to store a file to the FTP server
- string $local: Path to local file to store on the FTP server
- string $remote: FTP path to file to create
Method to write a string to the FTP server
- string $remote: FTP path to file to write to
- string $buffer: Contents to write to the FTP server
Inherited Methods
Inherited From JObject
JObject::JObject()
JObject::__construct()
JObject::get()
JObject::getPublicProperties()
JObject::set()
JObject::toString()
Documentation generated on Mon, 05 Mar 2007 21:02:06 +0000 by phpDocumentor 1.3.1