mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-01-11 19:44:55 +00:00
feat: Adding program data path to PathUtils
This commit is contained in:
@@ -84,6 +84,37 @@ namespace ICD.Common.Utils
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the absolute path to the program data directory.
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[PublicAPI]
|
||||
public static string ProgramDataPath { get { return Join(RootConfigPath, ProgramDataDirectory); } }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the name of the program data directory.
|
||||
/// This directory contains runtime program data that should be retained through deployments.
|
||||
/// </summary>
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the absolute path to the common configuration directory.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user