Class FileUtils
java.lang.Object
dev.jcputney.elearning.parser.util.FileUtils
Utility methods for file operations.
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringfindFileIgnoreCase(List<String> files, String targetName) Finds a file in the given list using case-insensitive matching.
-
Method Details
-
findFileIgnoreCase
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.
-