code: private static Set<CmsResource> getAllResourcesInModule(CmsObject cms, CmsModule module) throws CmsException {
  
          Set<CmsResource> result = new HashSet<>();
          for (CmsResource resource : CmsModule.calculateModuleResources(cms, module)) {
              result.add(resource);
              if (resource.isFolder()) {
                  result.addAll(cms.readResources(resource, CmsResourceFilter.ALL, true));
              }
          }
          return result;
      }
docs: Gets all resources in the module.<p>
  
  @param cms the current CMS context
  @param module the module
  @return the resources in the module
  @throws CmsException if something goes wrong