public override void DeleteSiteContent(int siteId) { SharedFile.DeleteBySite(siteId); if (SharedFilesConfiguration.DeleteFilesOnSiteDelete) { try { string fileVirtualBasePath = "~/Data/Sites/" + siteId.ToInvariantString() + "/SharedFiles/"; FileSystemProvider p = FileSystemManager.Providers[WebConfigSettings.FileSystemProvider]; if (p != null) { IFileSystem fileSystem = p.GetFileSystem(); if (fileSystem != null) { fileSystem.DeleteFolder(fileVirtualBasePath); } } } catch (Exception ex) { log.Error(ex); } } }
public override void DeleteSiteContent(int siteId) { SharedFile.DeleteBySite(siteId); }