@Test public void create() throws IOException { String destinationFolder = System.getProperty("java.io.tmpdir") + File.separator + "tata" + File.separator + "titi" + File.separator + "toto"; String fileName = "toto.txt"; File file = FileTool.create(destinationFolder, fileName); file.deleteOnExit(); Assert.assertTrue(file.createNewFile()); }
public static File create(String fileName) { String[] filePath = fileName.split(Pattern.quote(File.separator)); String name = filePath[filePath.length - 1]; return create(fileName.replace(name, ""), name); }
FileTool { public static File create(String fileName) { String[] filePath = fileName.split(Pattern.quote(File.separator)); String name = filePath[filePath.length - 1]; return create(fileName.replace(name, ""), name); } }
FileTool { public static File create(String fileName) { String[] filePath = fileName.split(Pattern.quote(File.separator)); String name = filePath[filePath.length - 1]; return create(fileName.replace(name, ""), name); } private  FileTool(); }
FileTool { public static File create(String fileName) { String[] filePath = fileName.split(Pattern.quote(File.separator)); String name = filePath[filePath.length - 1]; return create(fileName.replace(name, ""), name); } private  FileTool(); static List<String> reader(String fileName); static void writer(String destinationFolder, String fileName, String line); static File writer(String destinationFolder, String fileName, List<String> multiLine); static File create(String fileName); static File create(String destinationFolder, String fileName); static void copy(String fileSrc, String fileDest); static void copyFolderToFolder(String sourceFolder, String destinationFolder); }
FileTool { public static File create(String fileName) { String[] filePath = fileName.split(Pattern.quote(File.separator)); String name = filePath[filePath.length - 1]; return create(fileName.replace(name, ""), name); } private  FileTool(); static List<String> reader(String fileName); static void writer(String destinationFolder, String fileName, String line); static File writer(String destinationFolder, String fileName, List<String> multiLine); static File create(String fileName); static File create(String destinationFolder, String fileName); static void copy(String fileSrc, String fileDest); static void copyFolderToFolder(String sourceFolder, String destinationFolder);  }