public class PathTemplateLoader extends Object implements freemarker.cache.TemplateLoader
TemplateLoader that uses Paths in a specified directory as the source of templates.| Constructor and Description |
|---|
PathTemplateLoader(Path baseDir)
Creates a new file template loader that will use the specified directory as the base directory
for loading templates.
|
| Modifier and Type | Method and Description |
|---|---|
void |
closeTemplateSource(Object templateSource) |
Object |
findTemplateSource(String name) |
long |
getLastModified(Object templateSource) |
Reader |
getReader(Object templateSource,
String encoding) |
public final Path baseDir
public PathTemplateLoader(Path baseDir) throws IOException
baseDir - the base directory for loading templatesIOExceptionpublic Object findTemplateSource(String name) throws IOException
findTemplateSource in interface freemarker.cache.TemplateLoaderIOExceptionpublic long getLastModified(Object templateSource)
getLastModified in interface freemarker.cache.TemplateLoaderpublic Reader getReader(Object templateSource, String encoding) throws IOException
getReader in interface freemarker.cache.TemplateLoaderIOExceptionpublic void closeTemplateSource(Object templateSource)
closeTemplateSource in interface freemarker.cache.TemplateLoaderCopyright © 2016. All rights reserved.