Interface FileEntry

All Superinterfaces:
Container
All Known Subinterfaces:
WritableFileEntry
All Known Implementing Classes:
AppleArchiveFormatFileEntry, DiskFileStoreAdapter.DiskFileEntryAdapter, GamedosFileEntry, ShrinkitFileEntry, ZipFileEntry

public interface FileEntry extends Container
A FileEntry represents a single file in a file store. The generic interface is intentionally spare to keep useless methods to a minimum.
  • Method Details

    • getParent

      Directory getParent()
      The parent Directory, if applicable. Can return null if this is the root directory.
    • isDeleted

      boolean isDeleted()
      Indicates if this FileEntry is deleted.
    • getFileStore

      FileStore getFileStore()
      Returns the FileStore that this Entry originates from.
    • getName

      String getName()
      Returns the name of this entry: either a directory name or a file name. This does not contain any directory components -- strictly the name of this entry. Note that depending on context, this may be a computed field.
    • getSize

      long getSize()
      Returns the size, in bytes, of this item. It may be approximate (based off a sector count, for instance).
    • getDataFork

      DataBuffer getDataFork()
      Return the file's data. This does not include any metadata that may be embedded with the file.
    • getProdosAttributes

      ProdosAttributes getProdosAttributes()
      Interpret the FileEntry as if it were on a ProDOS volume. The intention is that ProDOS ended up being the common denominator in many tools and formats, so this allows each file store to manage the interpretation itself.
    • getResourceFork

      default Optional<DataBuffer> getResourceFork()
      Return the resource fork data. If there is no resource fork (or a resource fork is not supported), then this returns an empty Optional.
    • getContentType

      default ContentType getContentType()
      Return the type of content, if known. It should never return null; use UNKNOWN if not known.
      See Also: