public static boolean createDirectory(String path){
  File dir=new File(path);
  if (!dir.exists()) {
    if (!dir.mkdirs()) {
      return false;
    }
  }
  return true;
}

public static boolean createDirectory ( String path ) { File dir = new File ( path ) ; if ( ! dir . exists ( ) ) { if ( ! dir . mkdirs ( ) ) { return false ; } } return true ; }
create a directory if not already exist
