代码如下:/删除文件夹,参数文件夹路径 protected void DeleteDirectory(string dir,bool deleteSubDir) { try { Directory.Delete(dir, deleteSubDir); } catch (Exception e) { logger.Error(“DeleteDirectory Error dir = ” + dir, e); throw new Exception(“DeleteDirectory Error di