﻿// ###################### | #############################################################
// CLASS ................ | SOFTWARE DEVELOPMENT CAPSTONE (C868) ........................
// ASSIGNMENT ........... | C# PERFORMANCE ASSESSMENT ...................................
// TASK ................. | EZP1 TASK 2: SOFTWARE APPLICATION AND DOCUMENTATION .........
// ###################### | #############################################################
// WGU STUDENT .......... | Mark K Ewer .................................................
// STUDENT ID ........... | 001094518 ...................................................
// DEGREE PROGRAM ....... | B.S. in Software Development ................................
// ENROLLED ON .......... | Feb 1, 2019 .................................................
// MENTOR ............... | Becky Stovall ...............................................
// PHONE ................ | (904) 238-7347 ..............................................
// TIME ZONE ............ | Eastern Time ................................................
// EMAIL ................ | MEwer@wgu.edu or Mark@3w3r.com ..............................
// WEB SITE ............. | http://www.markewer.com .....................................
// ###################### | #############################################################
namespace EWER_C868.Core.Services
{
    using System.IO;

    public class FolderPathService
    {
        public string DatabasePath(string filename)
        {
            var path = Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.ApplicationData), filename);

            if (!File.Exists(path))
            {
                File.Create(path).Dispose();
            }

            return path;
        }

        public string EventStorePath(string foldername)
        {
            var path = Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.ApplicationData), foldername);

            if (!Directory.Exists(path))
            {
                _ = Directory.CreateDirectory(path);
            }

            return path;
        }
    }
}
