1
0
mirror of synced 2025-01-26 07:53:44 +01:00

29 lines
676 B
C#
Raw Normal View History

namespace SharedProject.Utils;
2022-08-25 15:36:23 +08:00
public static class PathHelper
{
public static string GetRootPath()
2022-08-25 15:36:23 +08: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 15:36:23 +08:00
}
2023-10-16 19:59:55 +09:00
public static string GetDatatablePath()
{
return Path.Combine(GetDataPath(), "datatable");
}
2022-08-25 15:36:23 +08:00
}