src/Conf.php
public static function deleteDir ($dir)
	{
		if (!is_dir($dir)) {
			return FALSE;
		}

		$dh = opendir($dir);
		while ($file = readdir($dh)) {
			if ($file != "." && $file != "..") {
				$full_path = $dir . "/" . $file;
				if (!is_dir($full_path)) {
					unlink($full_path);
				}
				else {
					self::delete_dir($full_path);
				}
			}
		}
		closedir($dh);
		if (rmdir($dir)) {
			return TRUE;
		}
		else {
			return FALSE;
		}
	}
public static function deleteDir ($dir)
	{
		if (!is_dir($dir)) {
			return FALSE;
		}

		$dh = opendir($dir);
		while ($file = readdir($dh)) {
			if ($file != "." && $file != "..") {
				$full_path = $dir . "/" . $file;
				if (!is_dir($full_path)) {
					unlink($full_path);
				}
				else {
					self::delete_dir($full_path);
				}
			}
		}
		closedir($dh);
		if (rmdir($dir)) {
			return TRUE;
		}
		else {
			return FALSE;
		}
	}
删除目录

@param $dir

@return bool