Interface FileStore

All Superinterfaces:
CapabilityProvider, Container, InformationProvider
All Known Implementing Classes:
AppleArchiveFormatFileStore, DiskFileStoreAdapter, GamedosFileStore, ShrinkitFileStore, ZipFileStore

public interface FileStore extends CapabilityProvider, Container, InformationProvider
A FileStore is a generic interface for all archive and filesystem objects.
  • Method Details

    • getLabel

      String getLabel()
      The label is a mechanism to distinguish multiple file stores in a single file. For instance, UniDOS has two file stores in the file, so it would have two different labels such as "Disk 1" and "Disk 2".
    • getRootDirectory

      Directory getRootDirectory()
      All FileStores support a "root" directory that references all files.
    • getPathSeparator

      String getPathSeparator()
      This is the path separator character.
    • getDisplayColumns

      List<DisplayColumn> getDisplayColumns()
      Yields a list of columns to be used in this display mode.
    • flush

      default void flush()

      Flush any pending writes back to the source. This is intended to handle archives as they do not have a fixed structure to write changes. flush should be invoked before a save.

      Example usage:

      FileStore fileStore = fileStoreSelection.getSelectedItem();
      fileStore.flush();
      Source source = fileStore.get(Source.class).orElseThrow();
      source.save();