public File createNewFolder(File containingDir) throws IOException {
  if (containingDir == null) {
    throw new IOException("Containing directory is null:");
  }
  File newFolder=createFileObject(containingDir,newFolderString);
  int i=2;
  while (newFolder.exists() && i < 100) {
    newFolder=createFileObject(containingDir,MessageFormat.format(newFolderNextString,new Integer(i)));
    i++;
  }
  if (newFolder.exists()) {
    throw new IOException("Directory already exists:" + newFolder.getAbsolutePath());
  }
 else {
    newFolder.mkdirs();
  }
  return newFolder;
}

public File createNewFolder ( File containingDir ) throws IOException { if ( containingDir == null ) { throw new IOException ( "Containing directory is null:" ) ; } File newFolder = createFileObject ( containingDir , newFolderString ) ; int i = 2 ; while ( newFolder . exists ( ) && i < 100 ) { newFolder = createFileObject ( containingDir , MessageFormat . format ( newFolderNextString , new Integer ( i ) ) ) ; i ++ ; } if ( newFolder . exists ( ) ) { throw new IOException ( "Directory already exists:" + newFolder . getAbsolutePath ( ) ) ; } else { newFolder . mkdirs ( ) ; } return newFolder ; }
creates a new folder with a default folder name .
