code: public static String locateOrCreateDirectory(String dirName) throws IOException {
      String path = locateDirectory(dirName);
  
      if (path == null) {
        File file = new File(dirName);
        file.mkdirs();
        path = file.getCanonicalPath();
      }
  
      return path;
    }
docs: Same as locateDirectory(dirName), but also creates it if it doesn't exist.
  
  @param dirName
  @return
  @throws IOException