2013-02-21 06:00:56 +01:00
|
|
|
|
using System.IO;
|
|
|
|
|
|
|
|
|
|
namespace MediaBrowser.Model.IO
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Interface IZipClient
|
|
|
|
|
/// </summary>
|
|
|
|
|
public interface IZipClient
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Extracts all.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="sourceFile">The source file.</param>
|
|
|
|
|
/// <param name="targetPath">The target path.</param>
|
|
|
|
|
/// <param name="overwriteExistingFiles">if set to <c>true</c> [overwrite existing files].</param>
|
|
|
|
|
void ExtractAll(string sourceFile, string targetPath, bool overwriteExistingFiles);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Extracts all.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="source">The source.</param>
|
|
|
|
|
/// <param name="targetPath">The target path.</param>
|
|
|
|
|
/// <param name="overwriteExistingFiles">if set to <c>true</c> [overwrite existing files].</param>
|
|
|
|
|
void ExtractAll(Stream source, string targetPath, bool overwriteExistingFiles);
|
2013-09-25 02:54:51 +02:00
|
|
|
|
|
2017-09-25 07:06:15 +02:00
|
|
|
|
void ExtractAllFromGz(Stream source, string targetPath, bool overwriteExistingFiles);
|
2017-12-03 23:11:04 +01:00
|
|
|
|
void ExtractFirstFileFromGz(Stream source, string targetPath, string defaultFileName);
|
2017-09-25 07:06:15 +02:00
|
|
|
|
|
2014-12-29 03:50:02 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Extracts all from zip.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="source">The source.</param>
|
|
|
|
|
/// <param name="targetPath">The target path.</param>
|
|
|
|
|
/// <param name="overwriteExistingFiles">if set to <c>true</c> [overwrite existing files].</param>
|
|
|
|
|
void ExtractAllFromZip(Stream source, string targetPath, bool overwriteExistingFiles);
|
|
|
|
|
|
2013-09-25 02:54:51 +02:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Extracts all from7z.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="sourceFile">The source file.</param>
|
|
|
|
|
/// <param name="targetPath">The target path.</param>
|
|
|
|
|
/// <param name="overwriteExistingFiles">if set to <c>true</c> [overwrite existing files].</param>
|
|
|
|
|
void ExtractAllFrom7z(string sourceFile, string targetPath, bool overwriteExistingFiles);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Extracts all from7z.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="source">The source.</param>
|
|
|
|
|
/// <param name="targetPath">The target path.</param>
|
|
|
|
|
/// <param name="overwriteExistingFiles">if set to <c>true</c> [overwrite existing files].</param>
|
|
|
|
|
void ExtractAllFrom7z(Stream source, string targetPath, bool overwriteExistingFiles);
|
2013-10-13 05:39:22 +02:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Extracts all from tar.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="sourceFile">The source file.</param>
|
|
|
|
|
/// <param name="targetPath">The target path.</param>
|
|
|
|
|
/// <param name="overwriteExistingFiles">if set to <c>true</c> [overwrite existing files].</param>
|
|
|
|
|
void ExtractAllFromTar(string sourceFile, string targetPath, bool overwriteExistingFiles);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Extracts all from tar.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="source">The source.</param>
|
|
|
|
|
/// <param name="targetPath">The target path.</param>
|
|
|
|
|
/// <param name="overwriteExistingFiles">if set to <c>true</c> [overwrite existing files].</param>
|
|
|
|
|
void ExtractAllFromTar(Stream source, string targetPath, bool overwriteExistingFiles);
|
2013-11-10 19:11:42 +01:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Extracts all from rar.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="sourceFile">The source file.</param>
|
|
|
|
|
/// <param name="targetPath">The target path.</param>
|
|
|
|
|
/// <param name="overwriteExistingFiles">if set to <c>true</c> [overwrite existing files].</param>
|
|
|
|
|
void ExtractAllFromRar(string sourceFile, string targetPath, bool overwriteExistingFiles);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Extracts all from rar.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="source">The source.</param>
|
|
|
|
|
/// <param name="targetPath">The target path.</param>
|
|
|
|
|
/// <param name="overwriteExistingFiles">if set to <c>true</c> [overwrite existing files].</param>
|
|
|
|
|
void ExtractAllFromRar(Stream source, string targetPath, bool overwriteExistingFiles);
|
2013-02-21 06:00:56 +01:00
|
|
|
|
}
|
|
|
|
|
}
|