开发者

Android Converting .NET Path.Combine to java?

开发者 https://www.devze.com 2023-01-12 01:54 出处:网络
We are converting apps to Android from .NET Is there a 开发者_如何学CJava equivalent of the .NET Path.Combine() function?

We are converting apps to Android from .NET

Is there a 开发者_如何学CJava equivalent of the .NET Path.Combine() function?

Currently we check the / on each folder etc before building paths.


import java.io.File;

// ...

public static String pathCombine(String path1, String path2)
{
    File parent = new File(path1);
    File child = new File(parent, path2);
    return child.getPath();
}
0

精彩评论

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