public IBackupSet AddBackupSet(string basePath, string name) { var newBackupSet = new BackupSet(basePath, name); BackupSets.Add(newBackupSet); return(newBackupSet); }
private IBackupIndex GetNewBackupIndex() { var newBackupIndex = new BackupIndex(); var directoriesToBackup = Catalog.GetDirectories(); foreach (var directory in directoriesToBackup) { var backupDirectory = BackupIOFactory.GetBackupDirectory(directory); var newBranch = new Branch(backupDirectory.Name); var root = GetTree(backupDirectory, newBranch); var newBackupSet = new BackupSet(backupDirectory.FullName, backupDirectory.Name) { Root = root }; newBackupIndex.BackupSets.Add(newBackupSet); } return(newBackupIndex); }