2013-02-21 05:00:56 +00: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 00:54:51 +00:00
|
|
|
|
|
2017-09-25 05:06:15 +00:00
|
|
|
|
void ExtractAllFromGz(Stream source, string targetPath, bool overwriteExistingFiles);
|
2017-12-03 22:11:04 +00:00
|
|
|
|
void ExtractFirstFileFromGz(Stream source, string targetPath, string defaultFileName);
|
2017-09-25 05:06:15 +00:00
|
|
|
|
|
2014-12-29 02:50:02 +00: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 00:54:51 +00: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 03:39:22 +00: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 18:11:42 +00: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 05:00:56 +00:00
|
|
|
|
}
|
|
|
|
|
}
|