mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 21:43:33 -07:00
more project clean up.
This commit is contained in:
parent
126f499259
commit
50674d388c
98 changed files with 86 additions and 225 deletions
23
NzbDrone.Common/ArchiveProvider.cs
Normal file
23
NzbDrone.Common/ArchiveProvider.cs
Normal file
|
@ -0,0 +1,23 @@
|
|||
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.");
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue