This commit is contained in:
hyb1996
2018-01-23 14:37:12 +08:00
parent bb6d44e696
commit af2c3940ed
4 changed files with 30 additions and 6 deletions

View File

@@ -409,8 +409,12 @@ public class PFiles {
return file.isDirectory() && file.list().length == 0;
}
public static String join(String parent, String child) {
return new File(parent, child).getPath();
public static String join(String base, String... paths) {
File file = new File(base);
for (String path : paths) {
file = new File(file, path);
}
return file.getPath();
}
public static String getHumanReadableSize(long bytes) {