Class FileList


  • public class FileList
    extends Object
    Class that can hold a list of files and directories. Used to store files and directories found when traversing a directory.
    Author:
    mcayanan
    • Constructor Detail

      • FileList

        public FileList()
    • Method Detail

      • addToFileList

        public void addToFileList​(Object o)
        Adds a single object to the end of the file list
        Parameters:
        o - a single file to add
      • addToFileList

        public void addToFileList​(Collection c)
        Adds a list of objects to the end of the file list
        Parameters:
        c - a list of files to add
      • addToDirList

        public void addToDirList​(Object o)
        Adds a single object to the end of the directory list
        Parameters:
        o - a single directory to add
      • addToDirList

        public void addToDirList​(Collection c)
        Adds a list of objects to the end of the directory list
        Parameters:
        c - a list of directories to add
      • getFiles

        public List getFiles()
        Gets files that were added to the list
        Returns:
        a list of files
      • getDirs

        public List getDirs()
        Gets directories that were added to the list
        Returns:
        a list of directories