/src/CleanZip.Core/ZipTarget.cs

https://bitbucket.org/jens13/cleanzip · C# · 24 lines · 16 code · 4 blank · 4 comment · 0 complexity · a13b4c9d0ac5b11233edc4c64053c3e8 MD5 · raw file

  1. // Copyright Jens Granlund 2012.
  2. // Distributed under the New BSD License.
  3. // (See accompanying file notice.txt or at
  4. // http://www.opensource.org/licenses/bsd-license.php)
  5. using CleanZip.Compression;
  6. namespace CleanZip
  7. {
  8. public class ZipTarget : ITarget
  9. {
  10. private readonly string _fileName;
  11. public ZipTarget(string fileName)
  12. {
  13. _fileName = fileName;
  14. }
  15. public IArchive CreateArchive()
  16. {
  17. return new ZipArchive(ZipFile.Open(_fileName));
  18. }
  19. }
  20. }