Files
SabreTools/RombaSharp/Features/Miss.cs

51 lines
1.6 KiB
C#
Raw Normal View History

2020-08-01 13:25:32 -07:00
using System.Collections.Generic;
using System.IO;
2020-12-08 13:23:59 -08:00
using SabreTools.Core;
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 = new Dictionary<string, Feature>();
}
public override void ProcessFeatures(Dictionary<string, Feature> features)
{
base.ProcessFeatures(features);
// Verify the filenames
Dictionary<string, string> foundDats = GetValidDats(Inputs);
// Create the new output directory if it doesn't exist
2020-12-10 22:16:53 -08:00
Path.Combine(Globals.ExeDir, "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");
2020-08-01 13:25:32 -07:00
}
}
}