Examples are as follows:
/** * Create multi-level directory file* * @param path File path* @throws IOException */private void createFile(String path) throws IOException { if (StringUtils.isNotEmpty(path)) { File file = new File(path); if (!file.getParentFile().exists()) { file.getParentFile().mkdirs(); } file.createNewFile(); }}The above example explanation of Java creating multi-level directory files is all the content I share with you. I hope you can give you a reference and I hope you can support Wulin.com more.