Class RecentFilesStore

java.lang.Object
megamek.client.ui.dialogs.advancedsearch.RecentFilesStore

public final class RecentFilesStore extends Object
This class implements a simple, not thread-safe recent-files-used storage. It is stored in a json file which must be given as a constructor parameter.
  • Constructor Details

  • Method Details

    • touch

      public void touch(Path file) throws IOException
      Adds or refreshes the given file as most-recently-used.
      Parameters:
      file - The "touched" file
      Throws:
      IOException
    • getRecentFiles

      public List<Path> getRecentFiles()
      Returns:
      The list of most recent files with the most recent first in the list.