using System;
using System.IO;

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

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

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