Files2 { public static File fromPath(String parent, String... path) { return new File(parent, Joiner.on(File.separatorChar).join(path)); } private  Files2(); static File fromPath(String parent, String... path); @Deprecated static boolean isValidPath(File file); @Nullable static File getAbsoluteFile(@NonNull File[] paths, @NonNull File file); @Nullable static File getRelativeFile(@NonNull File[] paths, @NonNull File file); static boolean acceptByLowerCaseExtension(File pathname, String... lowerCaseExtensions); @Nullable static File extractFile(@NonNull String path);  }
@Test public void testFromPath() { assertEquals(PATH, Files2.fromPath(PATH.getPath())); assertEquals(PATH + File.separator + "hello", Files2.fromPath(PATH.getPath(), "hello").getPath()); assertEquals(PATH + File.separator + "hello" + File.separator + "world", Files2.fromPath(PATH.getPath(), "hello", "world").getPath()); }