public static void mkdirs(File directory) throws CreateDirectoryException {
  if (directory.exists()) {
    if (directory.isDirectory()) {
      return;
    }
    if (!directory.delete()) {
      throw new CreateDirectoryException(directory.getAbsolutePath(),new FileDeleteException(directory.getAbsolutePath()));
    }
  }
  if (!directory.mkdirs() && !directory.isDirectory()) {
    throw new CreateDirectoryException(directory.getAbsolutePath());
  }
}

public static void mkdirs ( File directory ) throws CreateDirectoryException { if ( directory . exists ( ) ) { if ( directory . isDirectory ( ) ) { return ; } if ( ! directory . delete ( ) ) { throw new CreateDirectoryException ( directory . getAbsolutePath ( ) , new FileDeleteException ( directory . getAbsolutePath ( ) ) ) ; } } if ( ! directory . mkdirs ( ) && ! directory . isDirectory ( ) ) { throw new CreateDirectoryException ( directory . getAbsolutePath ( ) ) ; } }
creates the specified directory , along with all parent paths if necessary
