mirror of
https://github.com/Radarr/Radarr
synced 2024-12-29 11:25:26 +00:00
25 lines
No EOL
626 B
C#
25 lines
No EOL
626 B
C#
using System.Linq;
|
|
using Ionic.Zip;
|
|
using NLog;
|
|
|
|
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.");
|
|
}
|
|
|
|
}
|
|
} |