Class FileFind


  • public class FileFind
    extends java.lang.Object
    Takes a list of paths and filenames on the command line, and finds all the files in those directories, displaying only absolute filenames on Standard Output. Used by trec_setup.bat (on Windows) as Windows doesn't have a find file equivalent like find in Unix.
    java org.terrier.applications.FileFind c:\
    Author:
    Craig Macdonald
    • Constructor Summary

      Constructors 
      Constructor Description
      FileFind()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void findFiles​(java.util.List<java.lang.String> fileList, java.util.LinkedList<java.lang.String> dirList)
      Take 1 directory from the front of dirList, and add all files and directories it finds in that directory.
      static void main​(java.lang.String[] args)
      Takes a list of command line parameters of filenames and directories.
      • Methods inherited from class java.lang.Object

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

      • FileFind

        public FileFind()
    • Method Detail

      • findFiles

        public static void findFiles​(java.util.List<java.lang.String> fileList,
                                     java.util.LinkedList<java.lang.String> dirList)
        Take 1 directory from the front of dirList, and add all files and directories it finds in that directory. Recursively calls itself.
        Parameters:
        fileList - List of files found so far.
        dirList - List of directories remaining to be processed
      • main

        public static void main​(java.lang.String[] args)
        Takes a list of command line parameters of filenames and directories. Finds all files and directories in those, and displays all files on Standard Output as as absolute paths.
        Parameters:
        args - command line arguments - list of directories