You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Sonarr/NzbDrone.Core/Providers/Core/ArchiveProvider.cs

26 lines
672 B

using System;
using System.IO;
using System.Linq;
using Ionic.Zip;
using NLog;
using NzbDrone.Common;
14 years ago
namespace NzbDrone.Core.Providers.Core
14 years ago
{
public class ArchiveProvider
14 years ago
{
private static readonly Logger logger = LogManager.GetCurrentClassLogger();
public virtual void ExtractArchive(string compressedFile, string destination)
{
logger.Trace("Extracting archive [{0}] to [{1}]", compressedFile, destination);
using (ZipFile zipFile = ZipFile.Read(compressedFile))
{
zipFile.ExtractAll(destination);
}
logger.Trace("Extraction complete.");
}
14 years ago
}
}