public class TemplateVisitor
extends java.nio.file.SimpleFileVisitor<java.nio.file.Path>
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
TEMPLATED_FILE_EXT |
Constructor and Description |
---|
TemplateVisitor(java.nio.file.Path source,
java.nio.file.Path target,
freemarker.template.Configuration configuration,
DataContext data)
Instantiates a new template visitor.
|
Modifier and Type | Method and Description |
---|---|
java.nio.file.FileVisitResult |
preVisitDirectory(java.nio.file.Path file,
java.nio.file.attribute.BasicFileAttributes attrs) |
java.nio.file.FileVisitResult |
visitFile(java.nio.file.Path file,
java.nio.file.attribute.BasicFileAttributes attrs) |
public static final java.lang.String TEMPLATED_FILE_EXT
public TemplateVisitor(java.nio.file.Path source, java.nio.file.Path target, freemarker.template.Configuration configuration, DataContext data)
source
- the source directorytarget
- the target directoryconfiguration
- the freemarker configurationdata
- the data to injectpublic java.nio.file.FileVisitResult preVisitDirectory(java.nio.file.Path file, java.nio.file.attribute.BasicFileAttributes attrs) throws java.io.IOException
preVisitDirectory
in interface java.nio.file.FileVisitor<java.nio.file.Path>
preVisitDirectory
in class java.nio.file.SimpleFileVisitor<java.nio.file.Path>
java.io.IOException
public java.nio.file.FileVisitResult visitFile(java.nio.file.Path file, java.nio.file.attribute.BasicFileAttributes attrs) throws java.io.IOException
visitFile
in interface java.nio.file.FileVisitor<java.nio.file.Path>
visitFile
in class java.nio.file.SimpleFileVisitor<java.nio.file.Path>
java.io.IOException
Copyright © 1998-2019 Apache Software Foundation. All Rights Reserved.