code: public static void createDirectory(final String directory) {
          if (directory == null) return;
          final File f = new File(directory);
          if (!f.isDirectory()) {
              if (!f.mkdir()) throw new RuntimeException("couldn't create "
                      + directory);
          }
      }
docs: Create the provided directory, if it does not already exist.
  
  @param directory Path to create
  @throws RuntimeException Thrown if directory creation failed