Files
SabreTools/RombaSharp/Features/DatStats.cs

37 lines
1.1 KiB
C#
Raw Normal View History

2020-08-01 13:25:32 -07:00
using System.Collections.Generic;
using System.IO;
2020-12-10 23:24:09 -08:00
using SabreTools.DatTools;
2020-12-07 13:57:26 -08:00
using SabreTools.Help;
using SabreTools.Reports;
2020-08-01 13:25:32 -07:00
namespace RombaSharp.Features
{
internal class DatStats : BaseFeature
{
public const string Value = "DatStats";
public DatStats()
{
Name = Value;
Flags = new List<string>() { "datstats" };
Description = "Prints dat stats.";
2020-12-07 13:57:26 -08:00
_featureType = ParameterType.Flag;
2020-08-01 13:25:32 -07:00
LongDescription = "Print dat stats.";
Features = new Dictionary<string, Feature>();
}
public override void ProcessFeatures(Dictionary<string, Feature> features)
{
base.ProcessFeatures(features);
// If we have no inputs listed, we want to use datroot
if (Inputs == null || Inputs.Count == 0)
Inputs = new List<string> { Path.GetFullPath(_dats) };
// Now output the stats for all inputs
2020-12-10 23:24:09 -08:00
Statistics.OutputStats(Inputs, "rombasharp-datstats", null /* outDir */, true /* single */, true /* baddumpCol */, true /* nodumpCol */, StatReportFormat.Textfile);
2020-08-01 13:25:32 -07:00
}
}
}