protected Set<Resource> doFindPathMatchingFileResources(Resource rootDirResource, String subPattern)
        throws IOException {

        File rootDir;
        try {
            rootDir = rootDirResource.getFile().getAbsoluteFile();
        } catch (FileNotFoundException ex) {
            if (LOGGER.isDebugEnabled()) {
                LOGGER.debug("Cannot search for matching files underneath {} in the file system: {}", rootDirResource, ex.getMessage());
            }
            return Collections.emptySet();
        } catch (Exception ex) {
            if (LOGGER.isInfoEnabled()) {
                LOGGER.info("Failed to resolve {} in the file system: {}", rootDirResource, ex);
            }
            return Collections.emptySet();
        }
        return doFindMatchingFileSystemResources(rootDir, subPattern);
    }
Find all resources in the file system that match the given location pattern
via the Ant-style PathMatcher.

@param rootDirResource the root directory as Resource
@param subPattern      the sub pattern to match (below the root directory)
@return a mutable Set of matching Resource instances
@throws IOException in case of I/O errors
see #retrieveMatchingFiles
see org.springframework.util.PathMatcher
analyzer/src/main/java/nl/basjes/parse/useragent/utils/springframework/core/io/support/PathMatchingResourcePatternResolver.java