(string path)
| 64 | } |
| 65 | |
| 66 | static void ParseResourcesFolder(string path) |
| 67 | { |
| 68 | bool isRooted = Path.IsPathRooted(path); |
| 69 | if (!isRooted) |
| 70 | { |
| 71 | Console.WriteLine("You have inserted a bad path"); |
| 72 | return; |
| 73 | } |
| 74 | Console.WriteLine("¿Have you maded a resources backup? (Y/N): "); |
| 75 | char respuesta = Console.ReadKey().KeyChar; |
| 76 | bool canContinue = false; |
| 77 | if (respuesta == 'Y' || respuesta == 'y') |
| 78 | { |
| 79 | canContinue = true; |
| 80 | Console.WriteLine("\nConverting functions..."); |
| 81 | } |
| 82 | else if (respuesta == 'N' || respuesta == 'n') |
| 83 | { |
| 84 | Console.WriteLine("\nPlease first make a backup of your resources folder and then try this tool."); |
| 85 | } |
| 86 | if (!canContinue) return; |
| 87 | IEnumerable<string> Files = Directory.EnumerateFiles(path, "*", SearchOption.AllDirectories); |
| 88 | foreach (string file in Files) |
| 89 | { |
| 90 | bool ignore = false; |
| 91 | foreach (string keyword in ignoreFiles) |
| 92 | { |
| 93 | if (file.Contains(keyword)) |
| 94 | { |
| 95 | ignore = true; |
| 96 | break; |
| 97 | } |
| 98 | } |
| 99 | bool handled = false; |
| 100 | foreach (string extension in handledExtensions) |
| 101 | { |
| 102 | if (file.Contains(extension)) { handled = true; break; } |
| 103 | } |
| 104 | foreach (string extension in ignoreExtensions) |
| 105 | { |
| 106 | if (file.Contains(extension)) |
| 107 | { |
| 108 | ignore = true; |
| 109 | break; |
| 110 | } |
| 111 | } |
| 112 | foreach (string resource in ignoreResources) |
| 113 | { |
| 114 | if (file.Contains(resource)) |
| 115 | { |
| 116 | ignore = true; |
| 117 | break; |
| 118 | } |
| 119 | } |
| 120 | if (handled && !ignore) |
| 121 | { |
| 122 | if (file.Contains("fxmanifest.lua")) |
| 123 | HandleManifetst(file); |
nothing calls this directly
no outgoing calls
no test coverage detected