protected override void Execute(Game game, string msbName) { string _backupFolderPath = GamePath.GetBackupPath(); Directory.CreateDirectory(_backupFolderPath); string backupFilePath = _backupFolderPath + msbName; if (!File.Exists(backupFilePath)) { File.Copy(GamePath.GetMapStudioPath() + msbName, backupFilePath); } }
protected override void Execute(Game game, string msbName) { string source = GamePath.GetMapStudioPath() + msbName; if (File.Exists(source)) { File.Copy(GamePath.GetBackupPath() + msbName, GamePath.GetMapStudioPath() + msbName, overwrite: true); } else { Console.WriteLine($"{source} backup not found"); } }
protected override void Execute(string filePath, string fileName) { string _backupFolderPath = GamePath.GetBackupPath(); Directory.CreateDirectory(_backupFolderPath); string backupFilePath = _backupFolderPath + fileName; if (!File.Exists(backupFilePath)) { File.Copy(filePath, backupFilePath); } }
protected override void Execute(string filePath, string fileName) { string backupPath = GamePath.GetBackupPath() + fileName; if (File.Exists(backupPath)) { File.Copy(backupPath, filePath, overwrite: true); } else { Console.WriteLine($"{backupPath} backup not found"); } }