1
0
mirror of synced 2024-11-24 06:50:15 +01:00
TaikoLocalServer/SharedProject/Utils/PathHelper.cs
2023-09-09 21:58:20 +09:00

24 lines
577 B
C#

namespace SharedProject.Utils;
public static class PathHelper
{
public static string GetRootPath()
{
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");
}
}