public bool DeleteDirectory(string path) { try { var dirInfo = new DirectoryInfo(path); dirInfo.Delete(true); return true; } catch (Exception ex) { throw new BlogException(ex.Message, ex.InnerException); } }