using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ZionVault.Util
{
    public class IO
    {
        public static void CreateDirectory(string dir)
        {
            string[] folders = dir.Split('\\');
            string CurrentFolder = folders[0];

            for(int i = 1; i <  folders.Length; i++)
            {
                if (!System.IO.Directory.Exists(CurrentFolder))
                    System.IO.Directory.CreateDirectory(CurrentFolder);
                
                CurrentFolder = $"{CurrentFolder}\\{folders[i]}";
            }
        }
    }
}
