From 8d85f6b8a2e1a15ff9ac8e0443bba9027afcd206 Mon Sep 17 00:00:00 2001 From: Alee14 Date: Sat, 1 Sep 2018 19:07:41 -0400 Subject: moved the create directory to file system class --- PortEngine/FileSystem.cs | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'PortEngine/FileSystem.cs') diff --git a/PortEngine/FileSystem.cs b/PortEngine/FileSystem.cs index 35f7ee6..af81225 100644 --- a/PortEngine/FileSystem.cs +++ b/PortEngine/FileSystem.cs @@ -26,8 +26,22 @@ using System.Threading.Tasks; namespace PortEngine { - class FileSystem + public class FileSystem { - + public static string appDataFolder + { + get + { + return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Project Ports"); + } + } + + public static void CreateDataFolder() + { + + if (!Directory.Exists(appDataFolder)) + Directory.CreateDirectory(appDataFolder); + } + } } -- cgit v1.2.3