private static boolean isMetadataFileSystemResource(final String location) {
        val metadataResource = FunctionUtils.doUnchecked(() -> ResourceUtils.isUrl(location) ? null : ResourceUtils.getResourceFrom(location));
        val scriptFactory = ExecutableCompiledScriptFactory.findExecutableCompiledScriptFactory();
        return metadataResource instanceof FileSystemResource
            && (scriptFactory.isEmpty() || !scriptFactory.get().isScript(location));
    }
This is {@link FileSystemResourceMetadataResolver}.

@author Misagh Moayyed
@since 5.2.0
support/cas-server-support-saml-idp-metadata/src/main/java/org/apereo/cas/support/saml/services/idp/metadata/cache/resolver/FileSystemResourceMetadataResolver.java