public static function deleteFiles($dir) {
		$dir = self::normalizePath($dir);
		if (\is_dir($dir)) {
			$files = \scandir($dir);
			foreach ($files as $file) {
				$fullPath = self::normalizePath(self::combinePath($dir, $file));
				if ($file != "." && $file != "..") {
					if (\is_dir($fullPath))
						self::deleteFiles($fullPath);
					else
						@\unlink($fullPath);
				}
			}
			@\rmdir($dir);
		}
		return true;
    }
public static function deleteFiles($dir) {
		$dir = self::normalizePath($dir);
		if (\is_dir($dir)) {
			$files = \scandir($dir);
			foreach ($files as $file) {
				$fullPath = self::normalizePath(self::combinePath($dir, $file));
				if ($file != "." && $file != "..") {
					if (\is_dir($fullPath))
						self::deleteFiles($fullPath);
					else
						@\unlink($fullPath);
				}
			}
			@\rmdir($dir);
		}
		return true;
    }
public static function deleteFiles ( $ dir ) { $ dir = self :: normalizePath ( $ dir ) ; if ( \ is_dir ( $ dir ) ) { $ files = \ scandir ( $ dir ) ; foreach ( $ files as $ file ) { $ fullPath = self :: normalizePath ( self :: combinePath ( $ dir , $ file ) ) ; if ( $ file != "." && $ file != ".." ) { if ( \ is_dir ( $ fullPath ) ) self :: deleteFiles ( $ fullPath ) ; else @ \ unlink ( $ fullPath ) ; } } @ \ rmdir ( $ dir ) ; } return true ; }
delete directory recursive
@param  string $dir directory path
@return void
delete directory recursive