public static function delTree($directory)
    {

        $files = array_diff(scandir($directory), array('.','..'));
		foreach ($files as $file) {
			$abspath = $directory.DIRECTORY_SEPARATOR.$file;
			if (is_dir($abspath)) {
				self::delTree($abspath);
			} else {
				unlink($abspath);
			}
		}
		return rmdir($directory);

    }