mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Cleanup between namespace extraction
This commit is contained in:
@@ -2,8 +2,6 @@
|
||||
using System.IO;
|
||||
|
||||
using SabreTools.Data;
|
||||
using SabreTools.IO;
|
||||
using SabreTools.Library.DatItems;
|
||||
|
||||
namespace SabreTools.Library.FileTypes
|
||||
{
|
||||
@@ -127,44 +125,23 @@ namespace SabreTools.Library.FileTypes
|
||||
|
||||
#region Extraction
|
||||
|
||||
/// <summary>
|
||||
/// Attempt to extract a file as an archive
|
||||
/// </summary>
|
||||
/// <param name="outDir">Output directory for archive extraction</param>
|
||||
/// <returns>True if the extraction was a success, false otherwise</returns>
|
||||
/// <inheritdoc/>
|
||||
public override abstract bool CopyAll(string outDir);
|
||||
|
||||
/// <summary>
|
||||
/// Attempt to extract an entry from an archive
|
||||
/// </summary>
|
||||
/// <param name="entryName">Name of the entry to be extracted</param>
|
||||
/// <param name="outDir">Output directory for archive extraction</param>
|
||||
/// <returns>Name of the extracted file, null on error</returns>
|
||||
/// <inheritdoc/>
|
||||
public override abstract string CopyToFile(string entryName, string outDir);
|
||||
|
||||
/// <summary>
|
||||
/// Attempt to extract a stream from an archive
|
||||
/// </summary>
|
||||
/// <param name="entryName">Name of the entry to be extracted</param>
|
||||
/// <param name="realEntry">Output representing the entry name that was found</param>
|
||||
/// <returns>MemoryStream representing the entry, null on error</returns>
|
||||
/// <inheritdoc/>
|
||||
public override abstract (MemoryStream, string) CopyToStream(string entryName);
|
||||
|
||||
#endregion
|
||||
|
||||
#region Information
|
||||
|
||||
/// <summary>
|
||||
/// Generate a list of DatItem objects from the header values in an archive
|
||||
/// </summary>
|
||||
/// <returns>List of DatItem objects representing the found data</returns>
|
||||
/// <inheritdoc/>
|
||||
public override abstract List<BaseFile> GetChildren();
|
||||
|
||||
/// <summary>
|
||||
/// Generate a list of empty folders in an archive
|
||||
/// </summary>
|
||||
/// <param name="input">Input file to get data from</param>
|
||||
/// <returns>List of empty folders in the archive</returns>
|
||||
/// <inheritdoc/>
|
||||
public override abstract List<string> GetEmptyFolders();
|
||||
|
||||
/// <summary>
|
||||
@@ -176,32 +153,14 @@ namespace SabreTools.Library.FileTypes
|
||||
|
||||
#region Writing
|
||||
|
||||
/// <summary>
|
||||
/// Write an input file to an archive
|
||||
/// </summary>
|
||||
/// <param name="inputFile">Input filename to be moved</param>
|
||||
/// <param name="outDir">Output directory to build to</param>
|
||||
/// <param name="rom">DatItem representing the new information</param>
|
||||
/// <returns>True if the archive was written properly, false otherwise</returns>
|
||||
public override abstract bool Write(string inputFile, string outDir, Rom rom);
|
||||
/// <inheritdoc/>
|
||||
public override abstract bool Write(string inputFile, string outDir, BaseFile baseFile);
|
||||
|
||||
/// <summary>
|
||||
/// Write an input stream to an archive
|
||||
/// </summary>
|
||||
/// <param name="inputStream">Input stream to be moved</param>
|
||||
/// <param name="outDir">Output directory to build to</param>
|
||||
/// <param name="rom">DatItem representing the new information</param>
|
||||
/// <returns>True if the archive was written properly, false otherwise</returns>
|
||||
public override abstract bool Write(Stream inputStream, string outDir, Rom rom);
|
||||
/// <inheritdoc/>
|
||||
public override abstract bool Write(Stream inputStream, string outDir, BaseFile baseFile);
|
||||
|
||||
/// <summary>
|
||||
/// Write a set of input files to an archive (assuming the same output archive name)
|
||||
/// </summary>
|
||||
/// <param name="inputFiles">Input files to be moved</param>
|
||||
/// <param name="outDir">Output directory to build to</param>
|
||||
/// <param name="rom">DatItem representing the new information</param>
|
||||
/// <returns>True if the archive was written properly, false otherwise</returns>
|
||||
public override abstract bool Write(List<string> inputFiles, string outDir, List<Rom> roms);
|
||||
/// <inheritdoc/>
|
||||
public override abstract bool Write(List<string> inputFiles, string outDir, List<BaseFile> baseFiles);
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user