Class FileSearcher


  • public class FileSearcher
    extends java.lang.Object
    Utility class to Search for Files in any directory All one needs is to call FileSearcher.gatherFilesFromDir and provide the necessary file extension(s) and the list will be returned.
    • Constructor Summary

      Constructors 
      Constructor Description
      FileSearcher()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.List<java.io.File> gatherFilesFromDir​(java.io.File currDirToSearch, java.util.List<java.lang.String> currFileTypeExtList, boolean useRecursionInSearch)
      Gather's all Files from the Directory that have the passed in File Type Extension.
      static void main​(java.lang.String[] args)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FileSearcher

        public FileSearcher()
    • Method Detail

      • gatherFilesFromDir

        public static final java.util.List<java.io.File> gatherFilesFromDir​(java.io.File currDirToSearch,
                                                                            java.util.List<java.lang.String> currFileTypeExtList,
                                                                            boolean useRecursionInSearch)
                                                                     throws FileSearcher.FileSearcherException
        Gather's all Files from the Directory that have the passed in File Type Extension. Returns this List of Files Found.
        Parameters:
        currDirToSearch - - The Directory to Search
        currFileTypeExtList - - The List of File Type Extensions to Search for
        useRecursionInSearch - - Determine whether to Search recursively or not
        Returns:
        - List of Files that were found
        Throws:
        FileSearcher.FileSearcherException
      • main

        public static void main​(java.lang.String[] args)
        Parameters:
        args -