Table of Contents

delete

API Package Subpackage Class Method Reference Last reviewed Doc status
API Home Package Joomla.Framework Subpackage Client Class JFTP Method delete Reference delete() Never Work in Progress

This method deletes a path (file/folder) on the FTP server.

Syntax

boolean delete ( $path )

$path string is a string containing the path to delete

Examples

Example

jimport( 'joomla.connector.ftp' );

$ftp = new JFTP( array( 'type' => FTP_BINARY ) );
$ftp->connect( '127.0.0.1' );
$ftp->login( 'testuser', 'testpass' );

if ($ftp->delete( 'robots.txt' ) ) {
    echo "Delete successful!";
} else {
    echo "Delete failed!";
}

might produce:

Result

Delete successful!