Files
SabreTools/RombaSharp/Features/Miss.cs

56 lines
1.7 KiB
C#
Raw Normal View History

2020-08-01 13:25:32 -07:00
using System.Collections.Generic;
using System.IO;
using SabreTools.DatFiles;
2020-12-10 23:24:09 -08:00
using SabreTools.DatTools;
2020-12-07 13:57:26 -08:00
using SabreTools.Help;
2020-12-07 15:08:57 -08:00
using SabreTools.IO;
2020-08-01 13:25:32 -07:00
namespace RombaSharp.Features
{
internal class Miss : BaseFeature
{
public const string Value = "Miss";
// Unique to RombaSharp
public Miss()
{
Name = Value;
Flags = new List<string>() { "miss" };
Description = "Create miss and have file";
2020-12-07 13:57:26 -08:00
_featureType = ParameterType.Flag;
2020-08-01 13:25:32 -07:00
LongDescription = "For each specified DAT file, create miss and have file";
Features = [];
2021-02-03 11:10:19 -08:00
// Common Features
AddCommonFeatures();
2020-08-01 13:25:32 -07:00
}
public override bool ProcessFeatures(Dictionary<string, Feature?> features)
2020-08-01 13:25:32 -07:00
{
2021-03-19 20:52:11 -07:00
// If the base fails, just fail out
if (!base.ProcessFeatures(features))
return false;
2020-08-01 13:25:32 -07:00
// Verify the filenames
Dictionary<string, string> foundDats = GetValidDats(Inputs);
// Create the new output directory if it doesn't exist
2020-12-11 22:52:28 -08:00
Path.Combine(PathTool.GetRuntimeDirectory(), "out").Ensure(create: true);
2020-08-01 13:25:32 -07:00
// Now that we have the dictionary, we can loop through and output to a new folder for each
foreach (string key in foundDats.Keys)
{
// Get the DAT file associated with the key
2020-12-10 13:53:34 -08:00
DatFile datFile = Parser.CreateAndParse(Path.Combine(_dats, foundDats[key]));
2020-08-01 13:25:32 -07:00
// Now loop through and see if all of the hash combinations exist in the database
/* ended here */
}
logger.Error("This feature is not yet implemented: miss");
2021-03-19 20:52:11 -07:00
return true;
2020-08-01 13:25:32 -07:00
}
}
}