mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-20 17:41:29 -07:00
cleanup necessary namespaces and adjust namespaces for certain classes to better represent what they're for models, helpers and tools are all different and shouldnt really be under the same namespace
38 lines
1.7 KiB
C#
38 lines
1.7 KiB
C#
using System;
|
|
using System.IO;
|
|
|
|
namespace Bloxstrap
|
|
{
|
|
static class Directories
|
|
{
|
|
// note that these are directories that aren't tethered to the basedirectory
|
|
// so these can safely be called before initialization
|
|
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 StartMenu => Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.StartMenu), "Programs", App.ProjectName);
|
|
public static string MyPictures => Environment.GetFolderPath(Environment.SpecialFolder.MyPictures);
|
|
|
|
public static string Base { get; private set; } = "";
|
|
public static string Downloads { get; private set; } = "";
|
|
public static string Integrations { get; private set; } = "";
|
|
public static string Versions { get; private set; } = "";
|
|
public static string Modifications { get; private set; } = "";
|
|
|
|
public static string Application { get; private set; } = "";
|
|
|
|
public static bool Initialized => string.IsNullOrEmpty(Base);
|
|
|
|
public static void Initialize(string baseDirectory)
|
|
{
|
|
Base = baseDirectory;
|
|
Downloads = Path.Combine(Base, "Downloads");
|
|
Integrations = Path.Combine(Base, "Integrations");
|
|
Versions = Path.Combine(Base, "Versions");
|
|
Modifications = Path.Combine(Base, "Modifications");
|
|
|
|
Application = Path.Combine(Base, $"{App.ProjectName}.exe");
|
|
}
|
|
}
|
|
}
|