Firelance 0.1.5.0

- Functional filters.
- Functional absolute and relative path converters.
This commit is contained in:
2020-07-08 17:42:49 +01:00
parent 06e4c505db
commit 89486560b4
2 changed files with 102 additions and 0 deletions
+16
View File
@@ -194,6 +194,7 @@ namespace DevConsole
private static void CmdHelperActions()
{
Console.WriteLine("A. Convert SpecialPath to AbsolutePath");
Console.WriteLine("B. Path and filter testing");
Console.WriteLine("X. <--- Go back\n");
Console.Write(":");
@@ -205,6 +206,16 @@ namespace DevConsole
case "A":
Console.WriteLine(Helpers.Converters.GetSpecialToAbsolutePath(Console.ReadLine().ToUpper()));
break;
case "B":
//var dir = Helpers.Filters.GetFileList(@"D:\Temp");
string fullPath = Helpers.Converters.MakeAbsolutePath(new List<string>() { Helpers.Converters.GetSpecialToAbsolutePath("%DOCUMENTS%") }, @"BioWare\Mass Effect Andromeda").First();
string relPath = Helpers.Converters.MakeRelativePath(new List<string>() { Helpers.Converters.GetSpecialToAbsolutePath("%DOCUMENTS%") }, fullPath).First();
Console.WriteLine($"Full: {fullPath}");
Console.WriteLine($"Relative Path: {relPath}");
PrintListValues(Helpers.Filters.FilterDirectory(fullPath, @"*.*", ""));
break;
case "X":
break;
}
@@ -324,5 +335,10 @@ namespace DevConsole
Console.WriteLine($"{item.Name}: {item.GetValue(data)}");
}
}
private static void PrintListValues(List<string> data)
{
foreach (var item in data) { Console.WriteLine(item); }
}
}
}