Package com.github.jknack.handlebars.io
Class FileTemplateLoader
- java.lang.Object
-
- com.github.jknack.handlebars.io.AbstractTemplateLoader
-
- com.github.jknack.handlebars.io.URLTemplateLoader
-
- com.github.jknack.handlebars.io.FileTemplateLoader
-
- All Implemented Interfaces:
TemplateLoader
public class FileTemplateLoader extends URLTemplateLoader
Load templates from the file system. A base path must be specified at creation time. The base path serve as template repository.- Since:
- 0.1.0
-
-
Field Summary
-
Fields inherited from interface com.github.jknack.handlebars.io.TemplateLoader
DEFAULT_PREFIX, DEFAULT_SUFFIX
-
-
Constructor Summary
Constructors Constructor Description FileTemplateLoader(java.io.File basedir)
Creates a newFileTemplateLoader
.FileTemplateLoader(java.io.File basedir, java.lang.String suffix)
Creates a newFileTemplateLoader
.FileTemplateLoader(java.lang.String basedir)
Creates a newFileTemplateLoader
.FileTemplateLoader(java.lang.String basedir, java.lang.String suffix)
Creates a newFileTemplateLoader
.
-
Method Summary
-
Methods inherited from class com.github.jknack.handlebars.io.URLTemplateLoader
sourceAt
-
Methods inherited from class com.github.jknack.handlebars.io.AbstractTemplateLoader
getCharset, getPrefix, getSuffix, resolve, setCharset, setPrefix, setSuffix
-
-
-
-
Constructor Detail
-
FileTemplateLoader
public FileTemplateLoader(java.io.File basedir, java.lang.String suffix)
Creates a newFileTemplateLoader
.- Parameters:
basedir
- The base directory. Required.suffix
- The view suffix. Required.
-
FileTemplateLoader
public FileTemplateLoader(java.io.File basedir)
Creates a newFileTemplateLoader
.- Parameters:
basedir
- The base directory. Required.
-
FileTemplateLoader
public FileTemplateLoader(java.lang.String basedir, java.lang.String suffix)
Creates a newFileTemplateLoader
.- Parameters:
basedir
- The base directory. Required.suffix
- The view suffix. Required.
-
FileTemplateLoader
public FileTemplateLoader(java.lang.String basedir)
Creates a newFileTemplateLoader
.- Parameters:
basedir
- The base directory. Required.
-
-