mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 21:43:33 -07:00
Alot of refactoring.
This commit is contained in:
parent
2e94e322f4
commit
72d0fc50ed
89 changed files with 503 additions and 767 deletions
25
NzbDrone.Core/Providers/Core/ArchiveProvider.cs
Normal file
25
NzbDrone.Core/Providers/Core/ArchiveProvider.cs
Normal file
|
@ -0,0 +1,25 @@
|
|||
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.");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue