mirror of
https://github.com/2dust/v2rayN.git
synced 2026-04-16 04:25:45 +00:00
Add a method for getting /opt/v2rayn-core paths
This commit is contained in:
parent
042bf068a3
commit
33b9f15415
1 changed files with 18 additions and 0 deletions
|
|
@ -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
|
#endregion TempPath
|
||||||
|
|
||||||
#region Platform
|
#region Platform
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue