docs: public static void cleanDirectory(File dir, String dirType) {
          boolean cleaned = true;
  
          if (dir.exists() && dir.isDirectory())
              cleaned = FileUtils.recursiveClean(dir);
  
          if (!cleaned)
              throw new IllegalStateException("The " + dirType + " could not be cleaned. " + dirType + "=" + dir);
  
          // re-create empty directory if it doesn't exist
          boolean created = dir.mkdirs();
          if (!dir.exists() && !created)
              throw new IllegalStateException("The " + dirType + "  could not be created. " + dirType + "=" + dir);
  
      }