private static List<Resource> scanForConfigurationResources(final Environment environment, final File config,
                                                                final List<String> profiles) {
        val possibleFiles = getAllPossibleExternalConfigDirFilenames(environment, config, profiles);
        return possibleFiles.stream()
            .filter(File::exists)
            .filter(File::isFile)
            .map(FileSystemResource::new)
            .collect(Collectors.toList());
    }
Get all possible configuration files for config directory that actually exist as files.

@param config   Folder in which to look for files
@param profiles Profiles that are active
@return List of files to be processed in order where last one processed overrides others
core/cas-server-core-configuration-api/src/main/java/org/apereo/cas/configuration/DefaultCasConfigurationPropertiesSourceLocator.java