public BackupDir(VirtualFileSystemPath oldDir, string backupFolderPrefix) { myOldDir = oldDir; myBackupDir = VirtualFileSystemDefinition.CreateTemporaryDirectory(InteractionContext.SolutionContext, null, backupFolderPrefix); myOldDir.CopyDirectory(myBackupDir); myOldDir.Delete(); }
public void Restore() { myOldDir.Delete(); myBackupDir.CopyDirectory(myOldDir); }
public void Dispose() { myTempFolder.Delete(); }