public final class FileContentSearch extends Object
| Modifier and Type | Method and Description |
|---|---|
static boolean |
contains(File file,
String pattern)
Determines if the given file contains the given regular expression.
|
static boolean |
contains(File file,
String[] patterns)
Determines if the given file contains the given regular expressions.
|
public static boolean contains(File file, String pattern) throws IOException
file - the file to testpattern - the pattern used to test the filetrue if the regular expression matches the file
content; otherwise falseIOException - thrown if there is an error reading the filepublic static boolean contains(File file, String[] patterns) throws IOException
file - the file to testpatterns - the array of patterns used to test the filetrue if one of the regular expressions matches the
file content; otherwise falseIOException - thrown if there is an error reading the fileCopyright © 2012–2020 OWASP. All rights reserved.