I'm almost finished versie 0.3 of my module and are change the methode.upgrade.php.
With this php file I want to delete a complete folder (including the files in that folder).
Seaching the internet I found this code :
Code: Select all
// delete jquery directory
$dir = "/modules/IwPopupManager/jquery";
if (!empty($dir)) {
array_map('unlink', array_filter((array) array_merge(glob("$dir/*"))));
}
rmdir($dir);
- Installed versie 0.1
- Copied versie 0.3 using ftp
- Did the upgrade in the cmsms console
Please advise how to delete the folder while upgrading the module.
T.I.A. again.