private IBackupIndex GetUnstoredFiles(IBackupIndex existingIndex, IBackupIndex previousIndex) { if (previousIndex == null) { return(existingIndex); } var diffIndex = new BackupIndex(); var allPreviousFileHashes = previousIndex.GetAllNodeHashes(); foreach (var existingBackupSet in existingIndex.BackupSets) { var diffBackupSet = diffIndex.AddBackupSet(existingBackupSet.BasePath, existingBackupSet.Root.Name); DiffBackupSets(existingBackupSet.Root, diffBackupSet.Root, allPreviousFileHashes); } return(diffIndex); }