org.linkedin.util-core/src/main/java/org/linkedin/util/io/IOUtils.java
public static boolean createNewDirectory(File directory) throws IOException
  {
    if(directory.exists())
      return false;

    if(!directory.mkdirs())
      throw new IOException("cannot create the directory: " + directory);

    return true;
  }
public static boolean createNewDirectory(File directory) throws IOException
  {
    if(directory.exists())
      return false;

    if(!directory.mkdirs())
      throw new IOException("cannot create the directory: " + directory);

    return true;
  }
public static boolean createNewDirectory ( File directory ) throws IOException { if ( directory . exists ( ) ) return false ; if ( ! directory . mkdirs ( ) ) throw new IOException ( "cannot create the directory: " + directory ) ; return true ; }
Creates a new directory. This method creates automatically all the parent
directories if necesary. Contrary to <code>File.mkdirs</code>, this method
will fail if the directory cannot be created. The returned value is also
different in meaning: <code>false</code> means that the directory was not
created because it already existed as opposed to it was not created because
we don't know.

@param directory the directory to create
@return <code>true</code> if the directory was created, <code>false</code>
if it existed already.
@throws IOException when there is a problem creating the directory
Creates a new directory . This method creates automatically all the parent directories if necesary . Contrary to <code > File . mkdirs< / code > this method will fail if the directory cannot be created . The returned value is also different in meaning : <code > false< / code > means that the directory was not created because it already existed as opposed to it was not created because we don t know .