| API | Package | Subpackage | Class | Method | Reference | Last reviewed | Doc status |
|---|---|---|---|---|---|---|---|
Home |
Joomla.Framework |
FileSystem |
JFolder |
delete |
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.
boolean delete ( $path )
| $path | string | is a string containing the path to the folder to delete. |
Example
jimport( 'joomla.filesystem.folder' ); if (JFolder::delete( 'test2' )) { echo "Folder successfully deleted!"; } else { echo "Folder deletion failed!"; }
might produce:
Result
Folder successfully deleted!