Add a method for getting /opt/v2rayn-core paths

This commit is contained in:
Valeriy Manzhos 2026-04-06 18:29:36 +03:00
parent 042bf068a3
commit 33b9f15415
No known key found for this signature in database
GPG key ID: 6547CFC8E2EC3D90

View file

@ -1093,6 +1093,24 @@ public class Utils
}
}
public static string GetOptCorePath(string filename = "")
{
var tempPath = Path.Combine("/opt/v2rayn-core");
if (!Directory.Exists(tempPath))
{
Directory.CreateDirectory(tempPath);
}
if (filename.IsNullOrEmpty())
{
return tempPath;
}
else
{
return Path.Combine(tempPath, filename);
}
}
#endregion TempPath
#region Platform