Skip to content

Instantly share code, notes, and snippets.

View pepakriz's full-sized avatar
🎯
Focusing

Josef Kříž pepakriz

🎯
Focusing
View GitHub Profile
<?php
/**
* This file is part of the Grido (http://grido.bugyik.cz)
*
* Copyright (c) 2011 Petr Bugyík (http://petr.bugyik.cz)
*
* For the full copyright and license information, please view
* the file license.md that was distributed with this source code.
*/
@pepakriz
pepakriz / delete.php
Created July 10, 2012 19:16 — forked from hrach/delete.php
Rekurzivní smazání adresáře v Nette
<?php
$dirContent = Finder::find('*')->from($directory)->childFirst();
foreach ($dirContent as $file) {
if ($file->isDir())
@rmdir($file->getPathname());
else
@unlink($file->getPathname());
}