using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using System.Text;
using JellyfinRPC.Properties;

namespace JellyfinRPC
{
    class FileChecker
    {
        public static void FolderCheck()
        {
            if (!Directory.Exists(Environment.GetEnvironmentVariable("appdata")+"/JellyfinRPC"))
            {
                Directory.CreateDirectory(Environment.GetEnvironmentVariable("appdata")+"/JellyfinRPC");
            }
        }

        public static void FileCheck()
        {
            if (!File.Exists(Environment.GetEnvironmentVariable("appdata")+"/JellyfinRPC/Config.txt"))
            {
                File.WriteAllBytes(Environment.GetEnvironmentVariable("appdata") + "/JellyfinRPC/Config.txt", Resources.Config_txt_default);
            }
        }
    }
}
