using System;
using System.IO;

namespace LauncherUpdater.Function
{
    public class FileConfig
    {
        private string LauncherVersionSetting = nameof(LauncherVersionSetting);

        public void SetLauncherIsChecked(string text) =>
            File.WriteAllText("./Launcher/" + this.LauncherVersionSetting, text + Environment.NewLine);

        public string GetLauncherIsChecked() => File.Exists(this.LauncherVersionSetting)
            ? File.ReadAllText("./Launcher/" + this.LauncherVersionSetting).Replace("\r\n", string.Empty)
            : "FALSE";
    }
}