Recursive rmdir for PHP
Rmrdir is available on Packagist (perchten/rmrdir) and as such is installable via Composer.
Add the following to your composer.json
{
"require": {
"perchten/rmrdir": "1.*"
}
}
Clone or download from GitHub and include directly in your code:
require_once "path/to/rmrdir.php"
rmrdir($dir)
Returns True
on Success, False
on failure
rmrdir
is licensed under the MIT License - see the LICENSE
file for details
This code was initially found on a Stack Overflow thread. I'm just making it available on repos for ease and further development.