Class FileNameGlobMatcher

java.lang.Object
freemarker.cache.TemplateSourceMatcher
freemarker.cache.FileNameGlobMatcher

public class FileNameGlobMatcher extends TemplateSourceMatcher
As opposed to PathGlobMatcher, it only compares the "file name" part (the part after the last /) of the source name with the given glob. For example, the file name glob *.ftlh matches both foo.ftlh and foo/bar.ftlh. With other words, that file name glob is equivalent with the **/*.ftlh) path glob ( PathGlobMatcher).
Since:
2.3.24
  • Constructor Details

  • Method Details

    • matches

      public boolean matches(String sourceName, Object templateSource) throws IOException
      Throws:
      IOException
    • isCaseInsensitive

      public boolean isCaseInsensitive()
    • setCaseInsensitive

      public void setCaseInsensitive(boolean caseInsensitive)
      Sets if the matching will be case insensitive (UNICODE compliant); default is false.
    • caseInsensitive

      public FileNameGlobMatcher caseInsensitive(boolean caseInsensitive)
      Fluid API variation of setCaseInsensitive(boolean)