Class FileUtils

java.lang.Object
dev.jcputney.elearning.parser.util.FileUtils

public final class FileUtils extends Object
Utility methods for file operations.
  • Method Details

    • findFileIgnoreCase

      public static String findFileIgnoreCase(List<String> files, String targetName)
      Finds a file in the given list using case-insensitive matching.

      This method performs a case-insensitive search for a file with the specified target name in the provided list of file paths. It returns the actual filename as it appears in the list, preserving the original casing.

      Parameters:
      files - The list of file paths to search.
      targetName - The target filename to search for (case-insensitive).
      Returns:
      The actual filename from the list that matches the target (preserving original casing), or null if no match is found.
      Throws:
      IllegalArgumentException - if files is null or targetName is null or empty.