public static void directoryCheck(String dir) throws IOException {
		final File file = new File(dir);

		if (!file.exists()) {
			FileUtils.forceMkdir(file);
		}
	}
public static void directoryCheck ( String dir ) throws IOException { final File file = new File ( dir ) ; if ( ! file . exists ( ) ) { FileUtils . forceMkdir ( file ) ; } }
Checks the existence of the directory. If it does not exist, the method creates it.

@param dir the directory to check.
@throws IOException if fails.