mirror of
https://github.com/Radarr/Radarr
synced 2024-12-26 01:38:24 +00:00
23 lines
No EOL
601 B
C#
23 lines
No EOL
601 B
C#
using System.Linq;
|
|
using Ionic.Zip;
|
|
using NLog;
|
|
|
|
namespace NzbDrone.Common
|
|
{
|
|
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 (var zipFile = ZipFile.Read(compressedFile))
|
|
{
|
|
zipFile.ExtractAll(destination);
|
|
}
|
|
|
|
logger.Trace("Extraction complete.");
|
|
}
|
|
}
|
|
} |