private static async Task RunCleanUp(EriManager configuration, string selectedTool) {
List<Tool> loadedTools = LoadValidTools(configuration, selectedTool); //private helper method to load the valid tools from our local configuration, selectedTool can be "all" to load all valid tools
if (loadedTools.Count == 0) return;
LogManager.EnviromentMessage("Setting up environment for [bold]collecting folder structure[/]\n");
List<(string Tool, DirectoryInfo Directories)>? directories = DirectoryManager.GenerateFolderListForRemoval(configuration, loadedTools); //private static class to generate folder that are matching to a tool type
if (directories is null || directories.Count == 0) return;
Tree ansiTree = GenerateTreeForDirectories(loadedTools, directories);
//In the Table each column is one Tool, where each row is a folder to be deleted.
if (ansiTree is null) return;
AnsiConsole.WriteLine();
AnsiConsole.Write(ansiTree);
if (LogManager.ConfirmationMessage("Delete the requested folder(s)?")) await RemovalProcess(directories);
}
private static async Task RunCleanUp(EriManager configuration, string selectedTool) {
List<Tool> loadedTools = LoadValidTools(configuration, selectedTool); //private helper method to load the valid tools from our local configuration, selectedTool can be "all" to load all valid tools
if (loadedTools.Count == 0) return;
LogManager.EnviromentMessage("Setting up environment for [bold]collecting folder structure[/]\n");
List<(string Tool, DirectoryInfo Directories)>? directories = DirectoryManager.GenerateFolderListForRemoval(configuration, loadedTools); //private static class to generate folder that are matching to a tool type
if (directories is null || directories.Count == 0) return;
Tree ansiTree = GenerateTreeForDirectories(loadedTools, directories);
//In the Table each column is one Tool, where each row is a folder to be deleted.
if (ansiTree is null) return;
AnsiConsole.WriteLine();
AnsiConsole.Write(ansiTree);
if (LogManager.ConfirmationMessage("Delete the requested folder(s)?")) await RemovalProcess(directories);
}