docs: boolean resolveExistingAssetsFromDirectoryRepo(Collection<String> featureNames, File repoDir, boolean isOverwrite) throws InstallException {
          Collection<String> existingAssets = new ArrayList<String>();
          for (List<List<RepositoryResource>> targetList : installResources.values()) {
              for (Iterator<List<RepositoryResource>> installResourcesListIterator = targetList.iterator(); installResourcesListIterator.hasNext();) {
                  List<RepositoryResource> installResourcesList = installResourcesListIterator.next();
                  for (Iterator<RepositoryResource> resourcesIterator = installResourcesList.iterator(); resourcesIterator.hasNext();) {
                      RepositoryResource installResource = resourcesIterator.next();
                      ResourceType resourceType = installResource.getType();
                      String assetName = "";
                      if (resourceType.equals(ResourceType.FEATURE) || resourceType.equals(ResourceType.ADDON)) {
                          assetName = ((EsaResource) installResource).getShortName();
                      } else {
                          SampleResource sr = ((SampleResource) installResource);
                          assetName = sr.getName();
                      }
                      String mainAttachmentName = null;
                      String jsonFileName = null;
                      RepositoryConnection connection = installResource.getRepositoryConnection();
                      log(Level.FINEST, "resolveExistingAssetsFromDirectoryRepo " + installResource.getName() + " at " + connection.getRepositoryLocation());
  
                      if (connection instanceof DirectoryRepositoryConnection) {
                          if (isOverwrite && connection.getRepositoryLocation().equalsIgnoreCase(repoDir.getPath())) {
                              throw ExceptionUtils.createByKey(InstallException.IO_FAILURE, "ERROR_DOWNLOAD_TO_SOURCE_REPO",
                                                               InstallUtils.getFeatureListOutput(featureNames), repoDir.getAbsolutePath());
                          }
                      }
                      try {
                          AttachmentResource mainAttachment = installResource.getMainAttachment();
                          if (mainAttachment != null) {
                              mainAttachmentName = mainAttachment.getName();
                              jsonFileName = mainAttachmentName + ".json";
                          }
                      } catch (RepositoryBackendException e) {
                          log(Level.SEVERE, e.getLocalizedMessage(), e);
                          throw ExceptionUtils.createByKey(InstallException.IO_FAILURE, "ERROR_FAILED_TO_DOWNLOAD_FEATURE",
                                                           InstallUtils.getFeatureListOutput(featureNames), repoDir.getAbsolutePath());
                      } catch (RepositoryResourceException e) {
                          log(Level.SEVERE, e.getLocalizedMessage(), e);
                          throw ExceptionUtils.createByKey(InstallException.IO_FAILURE, "ERROR_FAILED_TO_DOWNLOAD_FEATURE",
                                                           InstallUtils.getFeatureListOutput(featureNames), repoDir.getAbsolutePath());
                      }
                      if (mainAttachmentName != null && InstallUtils.isResourceExistsInDirectory(installResource, repoDir, mainAttachmentName, jsonFileName)) {
                          //TODO: get the short name here
                          if (RepositoryDownloadUtil.isPublicAsset(installResource.getType(), installResource)) {
                              existingAssets.add(assetName);
                          }
                          if (!isOverwrite)
                              resourcesIterator.remove();
                      }
                  }
                  if (installResourcesList.size() == 0)
                      installResourcesListIterator.remove();
              }
          }
  
          if (!existingAssets.isEmpty()) {
              String existingAssetsString = InstallUtils.getFeatureListOutput(existingAssets);
              if (isOverwrite) {
                  //show features will be overwritten
                  if (existingAssets.size() <= 1)
                      log(Level.INFO, Messages.INSTALL_KERNEL_MESSAGES.getLogMessage("STATE_DOWNLOADING_REPLACE_ASSET", existingAssetsString));
                  else
                      log(Level.INFO, Messages.INSTALL_KERNEL_MESSAGES.getLogMessage("STATE_DOWNLOADING_REPLACE_ASSETS", existingAssetsString));
              } else {
                  //show features will be skipped
                  if (existingAssets.size() <= 1)
                      log(Level.INFO, Messages.INSTALL_KERNEL_MESSAGES.getLogMessage("STATE_DOWNLOADING_IGNORE_ASSET", existingAssetsString));
                  else
                      log(Level.INFO, Messages.INSTALL_KERNEL_MESSAGES.getLogMessage("STATE_DOWNLOADING_IGNORE_ASSETS", existingAssetsString));
              }
          }
  
          return !isEmpty(installResources);
      }