1
0
mirror of synced 2024-11-28 00:20:53 +01:00
TaikoLocalServer/SharedProject/Utils/PathHelper.cs

24 lines
577 B
C#
Raw Normal View History

namespace SharedProject.Utils;
2022-08-25 09:36:23 +02:00
public static class PathHelper
{
public static string GetRootPath()
2022-08-25 09:36:23 +02:00
{
var path = Environment.ProcessPath;
if (path is null)
{
throw new ApplicationException();
}
var parentPath = Directory.GetParent(path);
if (parentPath is null)
{
throw new ApplicationException();
}
return Path.Combine(parentPath.ToString(), "wwwroot");
}
public static string GetDataPath()
{
return Path.Combine(GetRootPath(), "data");
2022-08-25 09:36:23 +02:00
}
}