code: public File checkFolders(Collection<String> yumDbFolders, String yumDbFolderPath) {
          if (!yumDbFolders.isEmpty()) {
              for (String folderPath : yumDbFolders) {
                  File file = new File(folderPath);
                  if (file.listFiles().length > 0 && folderPath.contains(yumDbFolderPath)) {
                      return file;
                  }
              }
          }
          return null;
      }
docs: find yumdb folder from collection