You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.2 KiB
39 lines
1.2 KiB
1 year ago
|
using StabilityMatrix.Core.Models.FileInterfaces;
|
||
1 year ago
|
|
||
1 year ago
|
namespace StabilityMatrix.Core.Models;
|
||
1 year ago
|
|
||
|
public static class GlobalConfig
|
||
|
{
|
||
|
private static string? libraryDir;
|
||
|
|
||
|
/// <summary>
|
||
|
/// Absolute path to the library directory.
|
||
|
/// Needs to be set by SettingsManager.TryFindLibrary() before being accessed.
|
||
|
/// </summary>
|
||
|
/// <exception cref="Exception"></exception>
|
||
|
public static string LibraryDir
|
||
|
{
|
||
|
get
|
||
|
{
|
||
|
if (string.IsNullOrEmpty(libraryDir))
|
||
|
{
|
||
|
throw new Exception("GlobalConfig.LibraryDir was not set before being accessed.");
|
||
|
}
|
||
|
return libraryDir;
|
||
|
}
|
||
|
set => libraryDir = value;
|
||
|
}
|
||
1 year ago
|
|
||
|
/// <summary>
|
||
|
/// Full path to the %APPDATA% directory.
|
||
|
/// Usually C:\Users\{username}\AppData\Roaming
|
||
|
/// </summary>
|
||
|
public static DirectoryPath AppDataDir { get; } = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
|
||
|
|
||
|
/// <summary>
|
||
|
/// Full path to the fixed home directory.
|
||
|
/// Currently %APPDATA%\StabilityMatrix
|
||
|
///</summary>
|
||
1 year ago
|
public static FilePath HomeDir { get; } = AppDataDir + @"StabilityMatrix\";
|
||
1 year ago
|
}
|