private void RebuildDictionary(IArchiveDirectory sourceDirectory, IArchiveDirectory destinationDirectory, RageArchiveEncryption7 archiveEncryption) { foreach (var sourceFile in sourceDirectory.GetFiles()) { RebuildFile(sourceFile, destinationDirectory, archiveEncryption); } foreach (var sourceSubDirectory in sourceDirectory.GetDirectories()) { var destinationSubDirectory = destinationDirectory.CreateDirectory(); destinationSubDirectory.Name = sourceSubDirectory.Name; RebuildDictionary(sourceSubDirectory, destinationSubDirectory, archiveEncryption); } }