IZipClient.cs 3.1 KB

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