Support Joomla!

references:joomla.framework:filesystem:jfolder-delete

Table of Contents

delete

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

Deletes a folder. If files or sub-folders exist within the folder, they are deleted as well. If safe mode is enabled, FTP will be used to delete the folder (if it is enabled). This function returns true if the operation is successful, false otherwise.

Syntax

boolean delete ( $path )

$path string is a string containing the path to the folder to delete.

Examples

Example

jimport( 'joomla.filesystem.folder' );
if (JFolder::delete( 'test2' )) {
    echo "Folder successfully deleted!";
} else {
    echo "Folder deletion failed!";
}

might produce:

Result

Folder successfully deleted!

Discussion

Full name:
E-Mail:
 
references/joomla.framework/filesystem/jfolder-delete.txt (533 views) · Last modified: 2007/08/15 15:06