ME3Explorer.KFreonTPFTools3.Cleanup C# (CSharp) Method

Cleanup() private method

Cleans up temporary files.
private Cleanup ( ) : void
return void
        private void Cleanup()
        {
            // KFreon: Clear temporary files
            for (int i = 0; i < 3; i++)
            {
                if (Directory.Exists(TemporaryPath))
                {
                    try
                    {
                        Directory.Delete(TemporaryPath, true);
                        DebugOutput.PrintLn("Successfully deleted existing temp files.");
                        break;
                    }
                    catch
                    {
                        DebugOutput.PrintLn("Failed to delete temp files. Waiting...");
                        System.Threading.Thread.Sleep(300);
                    }
                }
                else if (i != 0)
                {
                    DebugOutput.PrintLn("Successfully deleted existing temp files.");
                    break;
                }
            }
        }
KFreonTPFTools3