Package freemarker.cache
Class FileNameGlobMatcher
java.lang.Object
freemarker.cache.TemplateSourceMatcher
freemarker.cache.FileNameGlobMatcher
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncaseInsensitive(boolean caseInsensitive)Fluid API variation ofsetCaseInsensitive(boolean)booleanbooleanvoidsetCaseInsensitive(boolean caseInsensitive)Sets if the matching will be case insensitive (UNICODE compliant); default isfalse.
-
Constructor Details
-
FileNameGlobMatcher
- Parameters:
glob- Glob with the syntax defined byStringUtil.globToRegularExpression(String, boolean). Must not start with/.
-
-
Method Details
-
matches
- Throws:
IOException
-
isCaseInsensitive
public boolean isCaseInsensitive() -
setCaseInsensitive
public void setCaseInsensitive(boolean caseInsensitive)Sets if the matching will be case insensitive (UNICODE compliant); default isfalse. -
caseInsensitive
Fluid API variation ofsetCaseInsensitive(boolean)
-