mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-16 02:01:29 -07:00
45 lines
2.2 KiB
C#
45 lines
2.2 KiB
C#
namespace Bloxstrap
|
|
{
|
|
static class Paths
|
|
{
|
|
// note that these are directories that aren't tethered to the basedirectory
|
|
// so these can safely be called before initialization
|
|
public static string Temp => Path.Combine(Path.GetTempPath(), App.ProjectName);
|
|
public static string UserProfile => Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
|
|
public static string LocalAppData => Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
|
|
public static string Desktop => Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory);
|
|
public static string WindowsStartMenu => Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.StartMenu), "Programs");
|
|
public static string System => Environment.GetFolderPath(Environment.SpecialFolder.System);
|
|
|
|
public static string Process => Environment.ProcessPath!;
|
|
|
|
public static string TempUpdates => Path.Combine(Temp, "Updates");
|
|
public static string TempLogs => Path.Combine(Temp, "Logs");
|
|
|
|
public static string Base { get; private set; } = "";
|
|
public static string Downloads { get; private set; } = "";
|
|
public static string Logs { get; private set; } = "";
|
|
public static string Integrations { get; private set; } = "";
|
|
public static string Modifications { get; private set; } = "";
|
|
public static string Roblox { get; private set; } = "";
|
|
|
|
public static string Application { get; private set; } = "";
|
|
|
|
public static string CustomFont => Path.Combine(Modifications, "content\\fonts\\CustomFont.ttf");
|
|
|
|
public static bool Initialized => !String.IsNullOrEmpty(Base);
|
|
|
|
public static void Initialize(string baseDirectory)
|
|
{
|
|
Base = baseDirectory;
|
|
Downloads = Path.Combine(Base, "Downloads");
|
|
Logs = Path.Combine(Base, "Logs");
|
|
Integrations = Path.Combine(Base, "Integrations");
|
|
Modifications = Path.Combine(Base, "Modifications");
|
|
Roblox = Path.Combine(Base, "Roblox");
|
|
|
|
Application = Path.Combine(Base, $"{App.ProjectName}.exe");
|
|
}
|
|
}
|
|
}
|