IZipClient.cs 3.1 KB

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