示例#1
0
    /// <summary>Restores a backup of a file.</summary>
    /// <param name="settings">The settings we want to use to override the default settings.</param>
    /// <returns>True if a backup was restored, or False if no backup could be found.</returns>
    public static bool RestoreBackup(ES3Settings settings)
    {
        var backupSettings = new ES3Settings(settings.path + backupFileSuffix, settings);

        if (!FileExists(backupSettings))
        {
            return(false);
        }

        ES3.RenameFile(backupSettings, settings);

        return(true);
    }
示例#2
0
 public override void Enter()
 {
     ES3.RenameFile(oldFilePath.Value, newFilePath.Value, GetSettings(), GetSettings());
 }