Exemplo n.º 1
0
        internal void PrepareOutputDirectory()
        {
            if (!TempPath.Exists)
            {
                throw new Exception("Output directory not found: " + TempPath.FullName);
            }

            try
            {
                if (TempPath.Exists)
                {
                    TempPath.DeleteAsync(recursive: true, harshly: true).WaitAndThrow();
                }
                TempPath.Create();
            }
            catch (Exception ex)
            {
                throw new Exception("Failed to delete the previous output directory " +
                                    TempPath.FullName + Environment.NewLine + ex.Message);
            }
        }