Skip to content

Instantly share code, notes, and snippets.

@trizz
Created June 7, 2013 11:16
Show Gist options
  • Save trizz/5728600 to your computer and use it in GitHub Desktop.
Save trizz/5728600 to your computer and use it in GitHub Desktop.
Remove Munee cache dir
<?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