private void ScaffoldExportFolder() { // Folder must be empty to prevent accidental overwrite of an existing template if (Directory.Exists(_exportTemplateFolder)) { if (Directory.GetFileSystemEntries(_exportTemplateFolder).Count() != 0) { throw new Exception("Template export folder must be empty"); } } // Create export directories Directory.CreateDirectory(_exportDataFolder); Directory.CreateDirectory(_exportDefaultThemeFolder); _logger.LogTrace($"Created folder: {Path.Combine(_coreOptions.TemplateExportPath, _exportTemplate.Id)}"); }