public void Execute() { if (Directory.Exists(path)) { string temp = TransactionFileUtils.GetTempFileName(String.Empty); MoveDirectory(path, temp); backupPath = temp; } }
public void Execute() { if (Directory.Exists(path)) { var temp = TransactionFileUtils.GetTempFileName(string.Empty); TransactionFileUtils.EnsureTempFolderExists(); MoveDirectory(path, temp); backupPath = temp; } }
public override void Execute() { if (File.Exists(path)) { string temp = TransactionFileUtils.GetTempFileName(Path.GetExtension(path)); File.Copy(path, temp); backupPath = temp; } File.Delete(path); }