using StabilityMatrix.Core.Models.FileInterfaces;
namespace StabilityMatrix.Core.Models;
public static class GlobalConfig
{
private static string? libraryDir;
///
/// Absolute path to the library directory.
/// Needs to be set by SettingsManager.TryFindLibrary() before being accessed.
///
///
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;
}
///
/// Full path to the %APPDATA% directory.
/// Usually C:\Users\{username}\AppData\Roaming
///
public static DirectoryPath AppDataDir { get; } = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
///
/// Full path to the fixed home directory.
/// Currently %APPDATA%\StabilityMatrix
///
public static FilePath HomeDir { get; } = AppDataDir + @"StabilityMatrix\";
}