Module file.worker

Class ModifyFileExtensions

java.lang.Object
io.github.astrapi69.file.modify.ModifyFileExtensions

public final class ModifyFileExtensions extends Object
The class ModifyFileExtensions provides methods for modifying files
  • Method Details

    • modifyFile

      public static void modifyFile(Path inFilePath, Charset charsetOfOutputFile, FileChangeable modifier) throws IOException
      Modifies the input file line by line and writes the modification in the same file
      Parameters:
      inFilePath - the in file path
      charsetOfOutputFile - the charset of output file
      modifier - the modifier BiFunction
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • modifyFile

      public static void modifyFile(Path inFilePath, FileChangeable modifier) throws IOException
      Modifies the input file line by line and writes the modification in the same file
      Parameters:
      inFilePath - the in file path
      modifier - the modifier BiFunction
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • modifyFile

      public static void modifyFile(Path inFilePath, Path outFilePath, Charset charsetOfOutputFile, FileChangeable modifier) throws IOException
      Modifies the input file line by line and writes the modification in the new output file.
      Parameters:
      inFilePath - the in file path
      outFilePath - the out file path
      charsetOfOutputFile - the charset of output file
      modifier - the modifier BiFunction
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • modifyFile

      public static void modifyFile(Path inFilePath, Path outFilePath, FileChangeable modifier) throws IOException
      Modifies the input file line by line and writes the modification in the new output file
      Parameters:
      inFilePath - the in file path
      outFilePath - the out file path
      modifier - the modifier BiFunction
      Throws:
      IOException - Signals that an I/O exception has occurred.