public static function rmdir($path) { if (is_dir($path)) { foreach (scandir($path) as $name) { if (in_array($name, array('.', '..'))) { continue; } $subpath = $path . DIRECTORY_SEPARATOR . $name; Kurogo::rmdir($subpath); } return rmdir($path); } else { if (file_exists($path)) { return unlink($path); } } }
public function clearCacheGroup($cacheGroup) { if (!$cacheGroup) { return false; } $folder = $this->getCacheFolder($cacheGroup); return Kurogo::rmdir($folder); }