AwbUpdater.Updater.CreateTempDir C# (CSharp) Method

CreateTempDir() private method

Creates the temporary folder if it doesnt already exist. If it does exist, delete all the contents
private CreateTempDir ( ) : void
return void
        private void CreateTempDir()
        {
            if (Directory.Exists(_tempDirectory))
            {
                // clear its content just to be sure that no parasitic files are left
                Directory.Delete(_tempDirectory, true);
            }

            try
            {
                Directory.CreateDirectory(_tempDirectory);
            }
            catch (Exception) // UnauthorizedAccessException and IOEXception
            {
                UpdateUI("Unable to create temporary directory: " + _tempDirectory, true);
                throw new AbortException();
            }
            progressUpdate.Value = 10;
        }