开发者

How should I combine two paths including backwards relative paths?

开发者 https://www.devze.com 2022-12-09 10:18 出处:网络
I have an absolute path, and a relative path, and I want to combine the two, is there any built-in way?

I have an absolute path, and a relative path, and I want to combine the two, is there any built-in way?

The relative path can be as well "../../aa2/file.exe".

(path.combine does not support it - which is pretty bizarre 开发者_JAVA技巧by itself.)


Try Path.GetFullPath(Path.Combine(abs, rel))

0

精彩评论

暂无评论...
验证码 换一张
取 消