Delete directory recursively 28/10/2014
$dirContent = Nette\Utils\Finder::find('*')->from($directory)->childFirst(); foreach ($dirContent as $file) { if ($file->isDir()) @rmdir($file->getPathname()); else @unlink($file->getPathname()); } @unlink($directory);
$dirContent = Nette\Utils\Finder::find('*')->from($directory)->childFirst();
foreach ($dirContent as $file) {
if ($file->isDir())
@rmdir($file->getPathname());
else
@unlink($file->getPathname());
}
@unlink($directory);