Package: org.codehaus.groovy.tools.groovydoc

## [Java] Class FileOutputTool

- org.codehaus.groovy.tools.groovydoc.FileOutputTool

- All Implemented Interfaces and Traits:
    OutputTool

      public class FileOutputTool
      extends Object
      implements OutputTool

  Writes generated documentation and copied resources to the file system.

- - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public void` | `copyResource(String srcPath, String dstPath)` * Copy a resource file (doc-files/, snippet-files/ content) from * `srcPath` to `dstPath`. Routed through the tool rather * than calling `Files.copy` directly so that alternative tools * (notably MockOutputTool) can intercept the side-effect. * * Since: 6.0.0
    `` | `public void` | `makeOutputArea(String filename)` * Ensures that the supplied output location exists. * * Parameters: `filename` - the output directory or root path to prepare
    `` | `public void` | `writeToOutput(String fileName, String text, String charset)` * Writes rendered text to the supplied output file. * * throws: Exception if the output cannot be written Parameters: `fileName` - the file to write * `text` - the rendered content * `charset` - the character set to use when writing *

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### public void copyResource(String srcPath, String dstPath)

      * Copy a resource file (doc-files/, snippet-files/ content) from * `srcPath` to `dstPath`. Routed through the tool rather * than calling `Files.copy` directly so that alternative tools * (notably MockOutputTool) can intercept the side-effect. * *

      Since:
        6.0.0

    - #### public void makeOutputArea(String filename)

      * Ensures that the supplied output location exists. * *

      Parameters:
        `filename` - the output directory or root path to prepare

    - #### public void writeToOutput(String fileName, String text, String charset)

      * Writes rendered text to the supplied output file. * *

      throws:
        Exception if the output cannot be written
      Parameters:
        `fileName` - the file to write *
        `text` - the rendered content *
        `charset` - the character set to use when writing *