2
0

IZipClient.cs 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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. /// <summary>
  25. /// Extracts all from zip.
  26. /// </summary>
  27. /// <param name="source">The source.</param>
  28. /// <param name="targetPath">The target path.</param>
  29. /// <param name="overwriteExistingFiles">if set to <c>true</c> [overwrite existing files].</param>
  30. void ExtractAllFromZip(Stream source, string targetPath, bool overwriteExistingFiles);
  31. /// <summary>
  32. /// Extracts all from7z.
  33. /// </summary>
  34. /// <param name="sourceFile">The source file.</param>
  35. /// <param name="targetPath">The target path.</param>
  36. /// <param name="overwriteExistingFiles">if set to <c>true</c> [overwrite existing files].</param>
  37. void ExtractAllFrom7z(string sourceFile, string targetPath, bool overwriteExistingFiles);
  38. /// <summary>
  39. /// Extracts all from7z.
  40. /// </summary>
  41. /// <param name="source">The source.</param>
  42. /// <param name="targetPath">The target path.</param>
  43. /// <param name="overwriteExistingFiles">if set to <c>true</c> [overwrite existing files].</param>
  44. void ExtractAllFrom7z(Stream source, string targetPath, bool overwriteExistingFiles);
  45. /// <summary>
  46. /// Extracts all from tar.
  47. /// </summary>
  48. /// <param name="sourceFile">The source file.</param>
  49. /// <param name="targetPath">The target path.</param>
  50. /// <param name="overwriteExistingFiles">if set to <c>true</c> [overwrite existing files].</param>
  51. void ExtractAllFromTar(string sourceFile, string targetPath, bool overwriteExistingFiles);
  52. /// <summary>
  53. /// Extracts all from tar.
  54. /// </summary>
  55. /// <param name="source">The source.</param>
  56. /// <param name="targetPath">The target path.</param>
  57. /// <param name="overwriteExistingFiles">if set to <c>true</c> [overwrite existing files].</param>
  58. void ExtractAllFromTar(Stream source, string targetPath, bool overwriteExistingFiles);
  59. /// <summary>
  60. /// Extracts all from rar.
  61. /// </summary>
  62. /// <param name="sourceFile">The source file.</param>
  63. /// <param name="targetPath">The target path.</param>
  64. /// <param name="overwriteExistingFiles">if set to <c>true</c> [overwrite existing files].</param>
  65. void ExtractAllFromRar(string sourceFile, string targetPath, bool overwriteExistingFiles);
  66. /// <summary>
  67. /// Extracts all from rar.
  68. /// </summary>
  69. /// <param name="source">The source.</param>
  70. /// <param name="targetPath">The target path.</param>
  71. /// <param name="overwriteExistingFiles">if set to <c>true</c> [overwrite existing files].</param>
  72. void ExtractAllFromRar(Stream source, string targetPath, bool overwriteExistingFiles);
  73. }
  74. }