java.lang.Object
io.github.astrapi69.file.modify.ModifyFileExtensions
The class
ModifyFileExtensions
provides methods for modifying files-
Method Summary
Modifier and TypeMethodDescriptionstatic void
modifyFile
(Path inFilePath, FileChangeable modifier) Modifies the input file line by line and writes the modification in the same filestatic void
modifyFile
(Path inFilePath, Charset charsetOfOutputFile, FileChangeable modifier) Modifies the input file line by line and writes the modification in the same filestatic void
modifyFile
(Path inFilePath, Path outFilePath, FileChangeable modifier) Modifies the input file line by line and writes the modification in the new output filestatic void
modifyFile
(Path inFilePath, Path outFilePath, Charset charsetOfOutputFile, FileChangeable modifier) Modifies the input file line by line and writes the modification in the new output file.
-
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 pathcharsetOfOutputFile
- the charset of output filemodifier
- the modifier BiFunction- Throws:
IOException
- Signals that an I/O exception has occurred.
-
modifyFile
Modifies the input file line by line and writes the modification in the same file- Parameters:
inFilePath
- the in file pathmodifier
- 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 pathoutFilePath
- the out file pathcharsetOfOutputFile
- the charset of output filemodifier
- 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 pathoutFilePath
- the out file pathmodifier
- the modifier BiFunction- Throws:
IOException
- Signals that an I/O exception has occurred.
-