IZipClient.cs 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. using System.IO;
  2. namespace MediaBrowser.Model.IO
  3. {
  4. /// <summary>
  5. /// Interface IZipClient
  6. /// </summary>
  7. public interface IZipClient
  8. {
  9. /// <summary>
  10. /// Extracts all.
  11. /// </summary>
  12. /// <param name="sourceFile">The source file.</param>
  13. /// <param name="targetPath">The target path.</param>
  14. /// <param name="overwriteExistingFiles">if set to <c>true</c> [overwrite existing files].</param>
  15. void ExtractAll(string sourceFile, string targetPath, bool overwriteExistingFiles);
  16. /// <summary>
  17. /// Extracts all.
  18. /// </summary>
  19. /// <param name="source">The source.</param>
  20. /// <param name="targetPath">The target path.</param>
  21. /// <param name="overwriteExistingFiles">if set to <c>true</c> [overwrite existing files].</param>
  22. void ExtractAll(Stream source, string targetPath, bool overwriteExistingFiles);
  23. void ExtractAllFromGz(Stream source, string targetPath, bool overwriteExistingFiles);
  24. void ExtractFirstFileFromGz(Stream source, string targetPath, string defaultFileName);
  25. /// <summary>
  26. /// Extracts all from zip.
  27. /// </summary>
  28. /// <param name="source">The source.</param>
  29. /// <param name="targetPath">The target path.</param>
  30. /// <param name="overwriteExistingFiles">if set to <c>true</c> [overwrite existing files].</param>
  31. void ExtractAllFromZip(Stream source, string targetPath, bool overwriteExistingFiles);
  32. /// <summary>
  33. /// Extracts all from7z.
  34. /// </summary>
  35. /// <param name="sourceFile">The source file.</param>
  36. /// <param name="targetPath">The target path.</param>
  37. /// <param name="overwriteExistingFiles">if set to <c>true</c> [overwrite existing files].</param>
  38. void ExtractAllFrom7z(string sourceFile, string targetPath, bool overwriteExistingFiles);
  39. /// <summary>
  40. /// Extracts all from7z.
  41. /// </summary>
  42. /// <param name="source">The source.</param>
  43. /// <param name="targetPath">The target path.</param>
  44. /// <param name="overwriteExistingFiles">if set to <c>true</c> [overwrite existing files].</param>
  45. void ExtractAllFrom7z(Stream source, string targetPath, bool overwriteExistingFiles);
  46. /// <summary>
  47. /// Extracts all from tar.
  48. /// </summary>
  49. /// <param name="sourceFile">The source file.</param>
  50. /// <param name="targetPath">The target path.</param>
  51. /// <param name="overwriteExistingFiles">if set to <c>true</c> [overwrite existing files].</param>
  52. void ExtractAllFromTar(string sourceFile, string targetPath, bool overwriteExistingFiles);
  53. /// <summary>
  54. /// Extracts all from tar.
  55. /// </summary>
  56. /// <param name="source">The source.</param>
  57. /// <param name="targetPath">The target path.</param>
  58. /// <param name="overwriteExistingFiles">if set to <c>true</c> [overwrite existing files].</param>
  59. void ExtractAllFromTar(Stream source, string targetPath, bool overwriteExistingFiles);
  60. }
  61. }