Home » freemarker-2.3.13 » freemarker.cache » [javadoc | source]
freemarker.cache
public class: FileTemplateLoader [javadoc | source]
java.lang.Object
   freemarker.cache.FileTemplateLoader

All Implemented Interfaces:
    TemplateLoader

A TemplateLoader that uses files in a specified directory as the source of templates. If contains security checks that will prevent it serving templates outside the template directory (like <include /etc/passwd>. It compares canonical paths for this, so templates that are symbolically linked into the template directory from outside of it won't work either.
Field Summary
public final  File baseDir     
Constructor:
 public FileTemplateLoader() throws IOException 
    Creates a new file template cache that will use the current directory (the value of the system property user.dir as the base directory for loading templates. It will not allow access to template files that are accessible through symlinks that point outside the base directory.
 public FileTemplateLoader(File baseDir) throws IOException 
    Creates a new file template loader that will use the specified directory as the base directory for loading templates. It will not allow access to template files that are accessible through symlinks that point outside the base directory.
    Parameters:
    baseDir - the base directory for loading templates
 public FileTemplateLoader(File baseDir,
    boolean allowLinking) throws IOException 
    Creates a new file template loader that will use the specified directory as the base directory for loading templates.
    Parameters:
    baseDir - the base directory for loading templates
    allowLinking - if true, it will allow
Method from freemarker.cache.FileTemplateLoader Summary:
closeTemplateSource,   findTemplateSource,   getLastModified,   getReader
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from freemarker.cache.FileTemplateLoader Detail:
 public  void closeTemplateSource(Object templateSource) 
 public Object findTemplateSource(String name) throws IOException 
 public long getLastModified(Object templateSource) 
 public Reader getReader(Object templateSource,
    String encoding) throws IOException