@Test public void fromParts() { assertNull(FileUtil.fromParts()); assertNull(FileUtil.fromParts((String[]) null)); assertEquals("null", FileUtil.fromParts((String) null).getPath()); assertEquals("", FileUtil.fromParts("").getPath()); assertEquals("test", FileUtil.fromParts("test").getPath()); assertEquals("test" + File.separator + "again", FileUtil.fromParts("test", "again").getPath()); assertEquals("test" + File.separator + "again" + File.separator + "more", FileUtil.fromParts("test", "again", "more").getPath()); assertEquals("test" + File.separator + "again", FileUtil.fromParts("test" + File.separator, "again").getPath()); assertEquals("test" + File.separator + "again" + File.separator + "more", FileUtil.fromParts("test" + File.separator, "again" + File.separator, "more" + File.separator).getPath()); }
public static File fromParts(String ... parts) { String path = pathFromParts(parts); if (path == null) { return null; } else { return new File(path); } }
FileUtil { public static File fromParts(String ... parts) { String path = pathFromParts(parts); if (path == null) { return null; } else { return new File(path); } } }
FileUtil { public static File fromParts(String ... parts) { String path = pathFromParts(parts); if (path == null) { return null; } else { return new File(path); } } private  FileUtil(); }
FileUtil { public static File fromParts(String ... parts) { String path = pathFromParts(parts); if (path == null) { return null; } else { return new File(path); } } private  FileUtil(); static boolean copyDir(File fromDir, File toDir); static boolean copyDir(File fromDir, File toDir, FilenameFilter excluding); static boolean copy(File from, File to); static boolean copy(URL from, File to); static boolean copy(InputStream from, File to); static String getLocalPath(URL url, Map<String, String> headers, String name, String intoName); static boolean download(URL remoteUrl, Map<String, String> headers, File into, String name, String intoName, boolean ignoreFNF); static URL getUrl(String path); static InputStream downloadToStream(URL remoteUrl, Map<String, String> headers); static String pathFromParts(String ... parts); static File fromParts(String ... parts); static String resolveUnixTilde(String path); static String reverseUnixTilde(String path); static boolean isLocalPath(String path); static String encodeForURI(String filePath); static void delete(File file); static String getCanonicalPath(File file); static String stripFileUriPrefix(String path); static String getSha1Hash(File file); }
FileUtil { public static File fromParts(String ... parts) { String path = pathFromParts(parts); if (path == null) { return null; } else { return new File(path); } } private  FileUtil(); static boolean copyDir(File fromDir, File toDir); static boolean copyDir(File fromDir, File toDir, FilenameFilter excluding); static boolean copy(File from, File to); static boolean copy(URL from, File to); static boolean copy(InputStream from, File to); static String getLocalPath(URL url, Map<String, String> headers, String name, String intoName); static boolean download(URL remoteUrl, Map<String, String> headers, File into, String name, String intoName, boolean ignoreFNF); static URL getUrl(String path); static InputStream downloadToStream(URL remoteUrl, Map<String, String> headers); static String pathFromParts(String ... parts); static File fromParts(String ... parts); static String resolveUnixTilde(String path); static String reverseUnixTilde(String path); static boolean isLocalPath(String path); static String encodeForURI(String filePath); static void delete(File file); static String getCanonicalPath(File file); static String stripFileUriPrefix(String path); static String getSha1Hash(File file);  }