public class FileUtils extends Object
| Constructor and Description |
|---|
FileUtils() |
| Modifier and Type | Method and Description |
|---|---|
static Path |
findFlinkDist() |
static void |
replace(Path file,
Pattern pattern,
java.util.function.Function<Matcher,String> replacer)
|
public static void replace(Path file, Pattern pattern, java.util.function.Function<Matcher,String> replacer) throws IOException
Pattern against all lines in the given file, and replaces all
matches with the replacement generated by the given Function. 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.IOExceptionpublic static Path findFlinkDist()
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.