Class FileOutputTool
java.lang.Object
org.codehaus.groovy.tools.groovydoc.FileOutputTool
- All Implemented Interfaces:
OutputTool
Writes generated documentation and copied resources to the file system.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcopyResource(String srcPath, String dstPath) Copy a resource file (doc-files/, snippet-files/ content) fromsrcPathtodstPath.voidmakeOutputArea(String filename) Ensures that the supplied output location exists.voidwriteToOutput(String fileName, String text, String charset) Writes rendered text to the supplied output file.
-
Constructor Details
-
FileOutputTool
public FileOutputTool()
-
-
Method Details
-
makeOutputArea
Ensures that the supplied output location exists.- Specified by:
makeOutputAreain interfaceOutputTool- Parameters:
filename- the output directory or root path to prepare
-
writeToOutput
Writes rendered text to the supplied output file.- Specified by:
writeToOutputin interfaceOutputTool- Parameters:
fileName- the file to writetext- the rendered contentcharset- the character set to use when writing- Throws:
Exception- if the output cannot be written
-
copyResource
Copy a resource file (doc-files/, snippet-files/ content) fromsrcPathtodstPath. Routed through the tool rather than callingFiles.copydirectly so that alternative tools (notablyMockOutputTool) can intercept the side-effect.- Specified by:
copyResourcein interfaceOutputTool- Throws:
IOException
-