mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-04-12 12:07:05 +00:00
feat: Adding program data path to PathUtils
This commit is contained in:
parent
f33218f7a6
commit
099517df7d
1 changed files with 31 additions and 0 deletions
|
|
@ -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>
|
/// <summary>
|
||||||
/// Returns the absolute path to the common configuration directory.
|
/// Returns the absolute path to the common configuration directory.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue