1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-10 21:12:56 +01:00
Radarr/NzbDrone.Core/Providers/Core/ArchiveProvider.cs
2013-01-02 17:09:13 -08:00

26 lines
672 B
C#

using System;
using System.IO;
using System.Linq;
using Ionic.Zip;
using NLog;
using NzbDrone.Common;
namespace NzbDrone.Core.Providers.Core
{
public class ArchiveProvider
{
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.");
}
}
}