void (@NotNull File file) { if (file.isDirectory()) { return; } if (!file.mkdirs()) { if (file.exists()) { throw new IllegalStateException("Failed to create " + file + ": file exists and not a directory"); } throw new IllegalStateException("Failed to create " + file); } }