Class FileWatcher

  • All Implemented Interfaces:
    xal.tools.data.DataListener

    public class FileWatcher
    extends Object
    implements xal.tools.data.DataListener
    Watches specified folders for new files of particular types
    • Constructor Detail

      • FileWatcher

        public FileWatcher​(LaunchModel model)
        Constructor
    • Method Detail

      • preConfigure

        public void preConfigure()
        preconfigure when initializing without a document file
      • dataLabel

        public String dataLabel()
        provides the name used to identify the class in an external data source.
        Specified by:
        dataLabel in interface xal.tools.data.DataListener
        Returns:
        The tag for this data node.
      • update

        public void update​(xal.tools.data.DataAdaptor adaptor)
        Instructs the receiver to update its data based on the given adaptor.
        Specified by:
        update in interface xal.tools.data.DataListener
        Parameters:
        adaptor - The data adaptor corresponding to this object's data node.
      • write

        public void write​(xal.tools.data.DataAdaptor adaptor)
        Instructs the receiver to write its data to the adaptor for external storage.
        Specified by:
        write in interface xal.tools.data.DataListener
        Parameters:
        adaptor - The data adaptor corresponding to this object's data node.
      • listFiles

        public List<File> listFiles()
        list the filtered files
      • getFolders

        public List<File> getFolders()
        get the folders to watch
      • getFolder

        public File getFolder​(int index)
        get the folder at the specified index
      • watchFolders

        public void watchFolders​(File[] folders)
        add new folders to the watch list
      • watchFolder

        public void watchFolder​(File folder)
        add a new folder to the watch list
      • ignoreFolder

        public void ignoreFolder​(File folder)
        remove a folder from the watch list