Created
March 19, 2011 16:27
-
-
Save hrach/877585 to your computer and use it in GitHub Desktop.
Rekurzivní smazání adresáře v Nette
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$dirContent = Finder::find('*')->from($directory)->childFirst(); | |
foreach ($dirContent as $file) { | |
if ($file->isDir()) | |
@rmdir($file->getPathname()); | |
else | |
@unlink($file->getPathname()); | |
} | |
@unlink($directory); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A kde jsou slavné curly brackets, které svou nepřítomností způsobily tu chybu v SSL applu? 😊
Chtělo by to upgrade 😃