Class FileUtils
java.lang.Object
org.forgerock.maven.plugins.xcite.utils.FileUtils
Utility methods for handling files.
-
Method Summary
Modifier and TypeMethodDescriptionstatic String[]
getIncludedFiles
(File baseDirectory, String[] includes, String[] excludes) Get a list of relative file paths based on inclusion patterns.getStrings
(File file) Get the content of a file as an array of Strings.
-
Method Details
-
getStrings
Get the content of a file as an array of Strings.- Parameters:
file
- File containing the strings.- Returns:
- The array of strings contained in the file.
- Throws:
IOException
- Failed to read the file.
-
getIncludedFiles
Get a list of relative file paths based on inclusion patterns.- Parameters:
baseDirectory
- Where to look for files to include.includes
- Patterns specifying files to include. If null, match all files except files excluded by default.excludes
- Patterns specifying files to exclude. If null, exclude only image files and files excluded by default.- Returns:
- Relative paths to files.
-