Class RDOSFileEntry

java.lang.Object
org.applecommander.os.rdos.RDOSFileEntry
All Implemented Interfaces:
FileEntry, WritableFileEntry, RDOSConstants, Container

public class RDOSFileEntry extends Object implements WritableFileEntry, RDOSConstants
  • Method Details

    • readEntry

      public DataBuffer readEntry()
    • modifyEntry

      public void modifyEntry(Consumer<DataBuffer> consumer)
    • getDirectoryBlock

      public int getDirectoryBlock()
    • getDirectoryOffset

      public int getDirectoryOffset()
    • getParent

      public RDOSDirectory getParent()
      The Directory that holds this file.
      Specified by:
      getParent in interface FileEntry
    • isDeleted

      public boolean isDeleted()
      Indicates if this FileEntry is deleted.
      Specified by:
      isDeleted in interface FileEntry
    • getFileStore

      public RDOSFileStore getFileStore()
      Returns the FileStore that this Entry originates from.
      Specified by:
      getFileStore in interface FileEntry
    • getName

      public 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.
      Specified by:
      getName in interface FileEntry
    • setName

      public void setName(String name)
      Description copied from interface: WritableFileEntry
      Allows the name of this entry to be changed (depending on the Capability allowed by the underlying FileStore).
      Specified by:
      setName in interface WritableFileEntry
    • getType

      public String getType()
    • setType

      public void setType(String type)
    • getBlocks

      public int getBlocks()
    • setBlocks

      public void setBlocks(int blocks)
    • getAddress

      public int getAddress()
    • setAddress

      public void setAddress(int addr)
    • getFirstBlock

      public int getFirstBlock()
    • setFirstBlock

      public void setFirstBlock(int firstBlock)
    • getSize

      public long getSize()
      Returns the size, in bytes, of this item. It may be approximate (based off a sector count, for instance).
      Specified by:
      getSize in interface FileEntry
    • setSize

      public void setSize(int size)
    • getDataFork

      public DataBuffer getDataFork()
      Return the file's data. This does not include any metadata that may be embedded with the file.
      Specified by:
      getDataFork in interface FileEntry
    • getProdosAttributes

      public 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.
      Specified by:
      getProdosAttributes in interface FileEntry
    • get

      public <T> Optional<T> get(Class<T> iface)
      Specified by:
      get in interface Container
    • setDataFork

      public void setDataFork(DataBuffer data)
      Store the file's data. This does not include any metadata that may be embedded with the file.
      Specified by:
      setDataFork in interface WritableFileEntry