File (@NotNull File parent, @NotNull String name, @Nullable String content) { try { assertTrue(parent.getPath(), parent.isDirectory() || parent.mkdirs()); File file = new File(parent, name); assertTrue(file.getPath(), file.createNewFile()); if (content != null) { FileUtil.writeToFile(file, content); } return file; } catch (IOException e) { throw new RuntimeException(e); } }