Class FileTreeBuilder

All Implemented Interfaces:
Generator, Renamable, ResourceProvider

public class FileTreeBuilder extends AbstractGenerator

A provider that generates a FileTree from existing file trees. In general, copying file trees should be avoided. However, in some situations a resource provider and a consumer cannot be configured so that the output of the former can be used directly by the latter.

The provider generates a FileTree in the directory specified with into(Path) by copying files from the sources defined with one of the source-methods. The class is not named Copier because the specification of FileTreeBuilder.Sources supports transformations beyond simply copying.

The provider generates the FileTree in response to a request that matches the one set with requestForResult. The content of the generated file tree is returned using the type specified in the request.

A request for Cleanliness deletes the directory specified with into(Path).