using System.Collections.Generic;
using System.IO;
namespace SabreTools.FileTypes
{
public abstract class BaseArchive : Folder
{
#region Fields
///
/// Determines if dates are read or written
///
public bool UseDates { get; set; } = false;
#endregion
#region Protected instance variables
///
/// Buffer size used by archives
///
protected const int _bufferSize = 4096 * 128;
#endregion
#region Construtors
///
/// Create a new Archive with no base file
///
public BaseArchive() : base() { }
///
/// Create a new BaseArchive from the given file
///
/// Name of the file to use
public BaseArchive(string filename) : base(filename) { }
#endregion
#region Extraction
///
public override abstract bool CopyAll(string outDir);
///
public override abstract string? CopyToFile(string entryName, string outDir);
///
public override abstract (Stream?, string?) GetEntryStream(string entryName);
#endregion
#region Information
///
public override abstract List? GetChildren();
///
public override abstract List GetEmptyFolders();
///
/// Check whether the input file is a standardized format
///
public abstract bool IsTorrent();
#endregion
#region Writing
///
public override abstract bool Write(string inputFile, string outDir, BaseFile? baseFile);
///
public override abstract bool Write(Stream? inputStream, string outDir, BaseFile? baseFile);
///
public override abstract bool Write(List inputFiles, string outDir, List? baseFiles);
#endregion
}
}