Created
June 7, 2013 11:16
-
-
Save trizz/5728600 to your computer and use it in GitHub Desktop.
Remove Munee cache dir
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 | |
rmdir_recurse('../vendor/meenie/munee/cache'); | |
function rmdir_recurse($path) { | |
$path = rtrim($path, '/').'/'; | |
$handle = opendir($path); | |
while(false !== ($file = readdir($handle))) { | |
if($file != '.' and $file != '..' ) { | |
$fullpath = $path.$file; | |
if(is_dir($fullpath)) rmdir_recurse($fullpath); else unlink($fullpath); | |
} | |
} | |
closedir($handle); | |
rmdir($path); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment