Class FileUtils

java.lang.Object
org.forgerock.maven.plugins.xcite.utils.FileUtils

public final class FileUtils extends Object
Utility methods for handling files.
  • Method Details

    • getStrings

      public static ArrayList<String> getStrings(File file) throws IOException
      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

      public static String[] getIncludedFiles(File baseDirectory, String[] includes, String[] excludes)
      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.