wabbajack/Wabbajack.Paths.IO/KnownFolders.cs
2022-05-23 13:54:46 -06:00

28 lines
1.0 KiB
C#

using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
namespace Wabbajack.Paths.IO;
public static class KnownFolders
{
public static AbsolutePath EntryPoint
{
get
{
//var v = Process.GetCurrentProcess().ProcessName;
//return Assembly.GetExecutingAssembly().Location.ToAbsolutePath().Parent;
return Process.GetCurrentProcess().MainModule!.FileName!.ToAbsolutePath().Parent;
}
}
public static AbsolutePath AppDataLocal =>
Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData).ToAbsolutePath();
public static AbsolutePath WindowsSystem32 => Environment.GetFolderPath(Environment.SpecialFolder.System).ToAbsolutePath();
public static AbsolutePath WabbajackAppLocal => AppDataLocal.Combine("Wabbajack");
public static AbsolutePath CurrentDirectory => Directory.GetCurrentDirectory().ToAbsolutePath();
public static AbsolutePath Windows => Environment.GetFolderPath(Environment.SpecialFolder.Windows).ToAbsolutePath();
}