Nexus.Client.Games.Gamebryo.PluginManagement.Sorter.PluginSorter.Backup C# (CSharp) Method

Backup() private method

Backup the plugins.txt and loadorder.txt files
private Backup ( ) : void
return void
		private void Backup()
		{
			string strLocalAppData = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
			string strGameModeLocalAppData = Path.Combine(strLocalAppData, GameMode.ModeId);
			string strLoadOrderFilePath = Path.Combine(strGameModeLocalAppData, "loadorder.txt");
			string strPluginsFilePath = Path.Combine(strGameModeLocalAppData, "plugins.txt");

			if (File.Exists(strLoadOrderFilePath))
			{
				string strBakFilePath = Path.Combine(strGameModeLocalAppData, "loadorder.backup.nmm");
				if (!File.Exists(strBakFilePath))
					File.Copy(strLoadOrderFilePath, strBakFilePath, false);
			}

			if (File.Exists(strPluginsFilePath))
			{
				string strBakFilePath = Path.Combine(strGameModeLocalAppData, "plugins.backup.nmm");
				if (!File.Exists(strBakFilePath))
					File.Copy(strPluginsFilePath, strBakFilePath, false);
			}
		}