Package org.apache.flink.test.util
Class FileUtils
java.lang.Object
org.apache.flink.test.util.FileUtils
Collection of file-related utilities.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
FileUtils
public FileUtils()
-
-
Method Details
-
replace
public static void replace(Path file, Pattern pattern, Function<Matcher, String> replacer) throws IOExceptionMatches the givenPatternagainst all lines in the given file, and replaces all matches with the replacement generated by the givenFunction. All unmatched lines and provided replacements are written into the file, with the order corresponding to the original content. Newlines are automatically added to each line; this implies that an empty replacement string will result in an empty line to be written.- Throws:
IOException
-
findFlinkDist
-