docs: private void createResources(CmsUploadListener listener) throws CmsException, UnsupportedEncodingException {
  
          CmsObject cms = getCmsObject();
          String[] isRootPathVals = m_parameterMap.get(I_CmsUploadConstants.UPLOAD_IS_ROOT_PATH_FIELD_NAME);
          if ((isRootPathVals != null) && (isRootPathVals.length > 0) && Boolean.parseBoolean(isRootPathVals[0])) {
              cms = m_rootCms;
          }
          // get the target folder
          String targetFolder = getTargetFolder(cms);
          m_uploadHook = OpenCms.getWorkplaceManager().getUploadHook(cms, targetFolder);
  
          List<String> filesToUnzip = getFilesToUnzip();
  
          // iterate over the list of files to upload and create each single resource
          for (FileItem fileItem : m_multiPartFileItems) {
              if ((fileItem != null) && (!fileItem.isFormField())) {
                  // read the content of the file
                  byte[] content = fileItem.get();
                  fileItem.delete();
  
                  // determine the new resource name
                  String fileName = m_parameterMap.get(
                      fileItem.getFieldName() + I_CmsUploadConstants.UPLOAD_FILENAME_ENCODED_SUFFIX)[0];
                  fileName = URLDecoder.decode(fileName, "UTF-8");
  
                  if (filesToUnzip.contains(CmsResource.getName(fileName.replace('\\', '/')))) {
                      // import the zip
                      CmsImportFolder importZip = new CmsImportFolder();
                      try {
                          importZip.importZip(content, targetFolder, cms, false);
                      } finally {
                          // get the created resource names
                          for (CmsResource importedResource : importZip.getImportedResources()) {
                              m_resourcesCreated.put(
                                  importedResource.getStructureId().toString(),
                                  importedResource.getName());
                          }
                      }
                  } else {
                      // create the resource
                      CmsResource importedResource = createSingleResource(cms, fileName, targetFolder, content);
                      // add the name of the created resource to the list of successful created resources
                      m_resourcesCreated.put(importedResource.getStructureId().toString(), importedResource.getName());
                  }
  
                  if (listener.isCanceled()) {
                      throw listener.getException();
                  }
              }
          }
      }