diff --git a/ICD.Common.Utils/PathUtils.cs b/ICD.Common.Utils/PathUtils.cs index bf53748..a32307a 100644 --- a/ICD.Common.Utils/PathUtils.cs +++ b/ICD.Common.Utils/PathUtils.cs @@ -84,6 +84,37 @@ namespace ICD.Common.Utils } } + /// + /// Returns the absolute path to the program data directory. + /// + /// + [PublicAPI] + public static string ProgramDataPath { get { return Join(RootConfigPath, ProgramDataDirectory); } } + + /// + /// Returns the name of the program data directory. + /// This directory contains runtime program data that should be retained through deployments. + /// + public static string ProgramDataDirectory + { + get + { + switch (IcdEnvironment.RuntimeEnvironment) + { + case IcdEnvironment.eRuntimeEnvironment.SimplSharp: + case IcdEnvironment.eRuntimeEnvironment.SimplSharpPro: + case IcdEnvironment.eRuntimeEnvironment.Standard: + return string.Format("Program{0:D2}Data", ProgramUtils.ProgramNumber); + + case IcdEnvironment.eRuntimeEnvironment.SimplSharpProMono: + return "ProgramData"; + + default: + throw new ArgumentOutOfRangeException(); + } + } + } + /// /// Returns the absolute path to the common configuration directory. ///