Interface Directory

All Superinterfaces:
CapabilityProvider
All Known Subinterfaces:
WritableDirectory
All Known Implementing Classes:
DiskFileStoreAdapter.DiskDirectoryAdapter, GamedosDirectory, GenericDirectory, ZipDirectory

public interface Directory extends CapabilityProvider
A Directory represents a directory in a FileStore. Note that even file stores that don't naturally support a directory do contain a root directory, so there will be a directory associated to each FileStore.
  • Method Details

    • getParent

      Optional<Directory> getParent()
      Get the parent directory. If this is the root directory, it returns empty.
    • getFileStore

      FileStore getFileStore()
      Returns the FileStore that this Directory belongs to.
    • getName

      String getName()
      Returns the name of this directory.
    • getFiles

      List<FileEntry> getFiles()
      Return all entries that are stored in this directory.
    • getDirectories

      default List<Directory> getDirectories()
      Filter out the DirectoryEntry entries in this directory.
    • findFile

      default Optional<FileEntry> findFile(String name)
      Locate a given file of the given name recursively on the disk.