Package echo.util

Class FileUtil

java.lang.Object
echo.util.FileUtil

public class FileUtil extends Object
Used to interface with file system
  • Field Details

    • READING_INPUT_FROM

      private static final String READING_INPUT_FROM
      See Also:
    • mavenPluginLog

      private final PluginLog mavenPluginLog
    • encoding

      private final String encoding
    • fromFile

      private final String fromFile
    • basePath

      private final File basePath
    • toFile

      private final String toFile
    • appendToFile

      private final boolean appendToFile
    • forceOverwrite

      private final boolean forceOverwrite
  • Constructor Details

    • FileUtil

      public FileUtil(PluginParameters parameters, PluginLog mavenPluginLog)
      Create a new instance of the FileUtil
      Parameters:
      parameters - The user-supplied plugin parameters
      mavenPluginLog - Wrapper for Maven internal plugin logger
  • Method Details

    • saveToFile

      public void saveToFile(String message)
      Saves text output
      Parameters:
      message - The text to save
    • checkForNonWritableFile

      private void checkForNonWritableFile(File saveFile)
    • makeFileWritable

      private void makeFileWritable(File saveFile)
    • getFromFile

      public String getFromFile() throws IOException
      Retrieves the message from the location in attribute fromFile
      Returns:
      Content of the default sort order file
      Throws:
      IOException
    • getFileFromRelativeOrClassPath

      private InputStream getFileFromRelativeOrClassPath(File basePath, String file) throws IOException
      Throws:
      IOException