List of usage examples for com.google.common.base Files createParentDirs
public static void createParentDirs(File file) throws IOException
From source file:de.martido.genny.codegen.AbstractSourceFileGenerator.java
/** * Creates the actual source file and, if necessary, all parent directories. * //from ww w . jav a2 s .c om * @param sourceFile * <i>mandatory</i> - the {@link SourceFile}. * @return A {@code File}. * @throws IOException * If an I/O error occured. */ protected File createFile(SourceFile sourceFile) throws IOException { File file = new File(sourceFile.asPath()); Files.createParentDirs(file); Files.touch(file); return file; }