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);
                }
            }
        }
示例#2
0
 public override void DeleteSiteContent(int siteId)
 {
     SharedFile.DeleteBySite(siteId);
 }