VPPTool

Description

Velocity Context tool that provides access to the current source and destination file information and encodings.

Note that VPPTool is not available to files being processed via VPPFilter because no information about the source or destination streams are available to filters.

VPPTool is automatically inserted by VPPCopy and VPPJavac into the Velocity Context for each file processed. Using the key, vpp, you can access the following methods:

Method Description
getSourceName() Returns the full path name of the source file.
getSourceBaseName() Returns the base name of the source file.
getSourceDirName() Returns the directory path name of the source file.
getSourceLength() Returns the length in bytes of the source file.
getSourceLastModified() Returns the time the source file was last modified (as a Long).
getSourceEncoding() Returns the encoding of the source file.
getDestinationName() Returns the full path name of the destination file.
getDestinationBaseName() Returns the base name of the destination file.
getDestinationDirName() Returns the directory path name of the destination file.
getDestinationLength() Returns the length in bytes of the destination file.
getDestinationLastModified() Returns the time the destination file was last modified (as a Long).
getDestinationEncoding() Returns the encoding of the destination file.