docs: private CmsModule createModuleFolders(CmsObject cms, CmsModule module) throws CmsException {
  
          String modulePath = CmsWorkplace.VFS_PATH_MODULES + module.getName() + "/";
          List<CmsExportPoint> exportPoints = module.getExportPoints();
          List<String> resources = module.getResources();
  
          // set the createModuleFolder flag if any other flag is set
          if (module.isCreateClassesFolder()
              || module.isCreateElementsFolder()
              || module.isCreateI18NFolder()
              || module.isCreateLibFolder()
              || module.isCreateResourcesFolder()
              || module.isCreateSchemasFolder()
              || module.isCreateTemplateFolder()
              || module.isCreateFormattersFolder()) {
              module.setCreateModuleFolder(true);
          }
  
          Set<String> exportPointPaths = new HashSet<String>();
          for (CmsExportPoint exportPoint : exportPoints) {
              exportPointPaths.add(exportPoint.getUri());
          }
  
          // check if we have to create the module folder
  
          I_CmsResourceType folderType = OpenCms.getResourceManager().getResourceType(
              CmsResourceTypeFolder.getStaticTypeName());
          I_CmsResourceType configType = OpenCms.getResourceManager().getResourceType(CmsADEManager.MODULE_CONFIG_TYPE);
  
          if (module.isCreateModuleFolder()) {
              CmsResource resource = cms.createResource(modulePath, folderType);
              CmsResource configResource = cms.createResource(modulePath + CONFIG_FILE, configType);
              try {
                  cms.unlockResource(resource);
                  cms.unlockResource(configResource);
              } catch (CmsLockException locke) {
                  LOG.warn("Unbale to unlock resource", locke);
              }
              // add the module folder to the resource list
              resources.add(modulePath);
              module.setResources(resources);
          }
  
          // check if we have to create the template folder
          if (module.isCreateTemplateFolder()) {
              String path = modulePath + PATH_TEMPLATES;
              CmsResource resource = cms.createResource(path, folderType);
              try {
                  cms.unlockResource(resource);
              } catch (CmsLockException locke) {
                  LOG.warn("Unbale to unlock resource", locke);
              }
          }
  
          if (module.isCreateI18NFolder()) {
              String path = modulePath + PATH_i18n;
              CmsResource resource = cms.createResource(path, folderType);
              CmsResource bundleResource = cms.createResource(
                  path + module.getName() + SUFFIX_BUNDLE_FILE + "_" + CmsLocaleManager.getDefaultLocale(),
                  OpenCms.getResourceManager().getResourceType(CmsVfsBundleManager.TYPE_PROPERTIES_BUNDLE),
                  null,
                  null);
              cms.writeResource(bundleResource);
              try {
                  cms.unlockResource(resource);
                  cms.unlockResource(bundleResource);
              } catch (CmsLockException locke) {
                  LOG.warn("Unbale to unlock resource", locke);
              }
          }
  
          // check if we have to create the elements folder
          if (module.isCreateElementsFolder()) {
              String path = modulePath + PATH_ELEMENTS;
              CmsResource resource = cms.createResource(path, folderType);
              try {
                  cms.unlockResource(resource);
              } catch (CmsLockException locke) {
                  LOG.warn("Unbale to unlock resource", locke);
              }
          }
  
          if (module.isCreateFormattersFolder()) {
              String path = modulePath + PATH_FORMATTERS;
              CmsResource resource = cms.createResource(path, folderType);
              try {
                  cms.unlockResource(resource);
              } catch (CmsLockException locke) {
                  LOG.warn("Unbale to unlock resource", locke);
              }
          }
  
          // check if we have to create the schemas folder
          if (module.isCreateSchemasFolder()) {
              String path = modulePath + PATH_SCHEMAS;
              CmsResource resource = cms.createResource(path, folderType);
              try {
                  cms.unlockResource(resource);
              } catch (CmsLockException locke) {
                  LOG.warn("Unbale to unlock resource", locke);
              }
          }
  
          // check if we have to create the resources folder
          if (module.isCreateResourcesFolder()) {
              String path = modulePath + PATH_RESOURCES;
              CmsResource resource = cms.createResource(path, folderType);
              try {
                  cms.unlockResource(resource);
              } catch (CmsLockException locke) {
                  LOG.warn("Unbale to unlock resource", locke);
              }
          }
  
          // check if we have to create the lib folder
          if (module.isCreateLibFolder()) {
              String path = modulePath + PATH_LIB;
              CmsResource resource = cms.createResource(path, folderType);
              try {
                  cms.unlockResource(resource);
              } catch (CmsLockException locke) {
                  LOG.warn("Unbale to unlock resource", locke);
              }
              if (!exportPointPaths.contains(path)) {
                  CmsExportPoint exp = new CmsExportPoint(path, "WEB-INF/lib/");
                  exportPoints.add(exp);
              }
              module.setExportPoints(exportPoints);
          }
  
          // check if we have to create the classes folder
          if (module.isCreateClassesFolder()) {
              String path = modulePath + PATH_CLASSES;
              CmsResource resource = cms.createResource(path, folderType);
              try {
                  cms.unlockResource(resource);
              } catch (CmsLockException locke) {
                  LOG.warn("Unbale to unlock resource", locke);
              }
              if (!exportPointPaths.contains(path)) {
                  CmsExportPoint exp = new CmsExportPoint(path, "WEB-INF/classes/");
                  exportPoints.add(exp);
                  module.setExportPoints(exportPoints);
              }
  
              // now create all subfolders for the package structure
              StringTokenizer tok = new StringTokenizer(m_module.getName(), ".");
              while (tok.hasMoreTokens()) {
                  String folder = tok.nextToken();
                  path += folder + "/";
                  CmsResource resource2 = cms.createResource(path, folderType);
                  try {
                      cms.unlockResource(resource2);
                  } catch (CmsLockException locke) {
                      LOG.warn("Unbale to unlock resource", locke);
                  }
              }
          }
          return module;
      }