using System.Collections.Generic; using System.IO; namespace SabreTools.FileTypes { public abstract class BaseArchive : Folder { #region Fields #endregion #region Protected instance variables /// /// Determines if real dates are written /// protected bool _realDates = false; /// /// 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 /// /// Set if real dates are written /// public void SetRealDates(bool realDates) { _realDates = realDates; } /// 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 } }