Class ProdosCommonEntry

java.lang.Object
com.webcodepro.applecommander.storage.os.prodos.ProdosCommonEntry
Direct Known Subclasses:
ProdosCommonDirectoryHeader, ProdosFileEntry

public class ProdosCommonEntry extends Object
Represents the common Prodos entry behavior.

Date created: Oct 5, 2002 10:55:41 PM

  • Field Details

    • ENTRY_LENGTH

      public static final int ENTRY_LENGTH
      The standard ProDOS file entry length.
      See Also:
  • Constructor Details

    • ProdosCommonEntry

      public ProdosCommonEntry(ProdosFormatDisk disk, int block, int offset)
      Constructor for ProdosCommonEntry.
  • Method Details

    • getFileEntryBlock

      protected int getFileEntryBlock()
      Get the block in which the FileEntry resides.
    • getDisk

      protected ProdosFormatDisk getDisk()
      Get the ProdosFormatDisk that this FileEntry is attached to.
    • readFileEntry

      protected byte[] readFileEntry()
      Read the fileEntry bytes from the disk image.
    • isEmpty

      public boolean isEmpty()
      Indicates if this entry is empty - filled with $00.
    • writeFileEntry

      protected void writeFileEntry(byte[] entry)
      Write the fileEntry data to the disk image.
    • getStorageType

      protected int getStorageType()
      Get storage type.
    • setStorageType

      public void setStorageType(int storageType)
      Set the storage type.
    • isSeedlingFile

      public boolean isSeedlingFile()
      Indicates if this is a "seedling" file (only one data block).
    • setSeedlingFile

      public void setSeedlingFile()
      Sets the storage type to a "seedling" file (only one data block).
    • isSaplingFile

      public boolean isSaplingFile()
      Indicates if this is a "sapling" file (2 to 256 data blocks).
    • setSaplingFile

      public void setSaplingFile()
      Sets the storage type to a "sapling" file (2 to 256 data blocks).
    • isTreeFile

      public boolean isTreeFile()
      Indicates if this is a "tree" file (257 to 32768 data blocks).
    • setTreeFile

      public void setTreeFile()
      Sets the storage type to a "tree" file (257 to 32768 data blocks).
    • isSubdirectory

      public boolean isSubdirectory()
      Indicates if this is a subdirectory entry.
    • setSubdirectory

      public void setSubdirectory()
      Sets the storage type to a subdirectory entry.
    • isSubdirectoryHeader

      public boolean isSubdirectoryHeader()
      Indicates if this is a subdirectory header entry.
    • setSubdirectoryHeader

      public void setSubdirectoryHeader()
      Sets the storage type to a subdirectory header entry.
    • isVolumeHeader

      public boolean isVolumeHeader()
      Indicates if this is a volume header entry.
    • setVolumeHeader

      public void setVolumeHeader()
      Sets the storage type to a volume header entry.
    • getCreationDate

      public Date getCreationDate()
      Get the creation date.
    • setCreationDate

      public void setCreationDate(Date date)
      Set the creation date.
    • getProdosVersion

      public int getProdosVersion()
      Get the version of ProDOS that created this file.
    • setProdosVersion

      public void setProdosVersion(int version)
      Set the version of ProDOS that created this file.
    • getMinimumProdosVersion

      public int getMinimumProdosVersion()
      Get the minimum version of ProDOS which can access this file.
    • setMinimumProdosVersion

      public void setMinimumProdosVersion(int version)
      Set the minimum version of ProDOS which can access this file.
    • getAccess

      protected byte getAccess()
      Get the access byte.
    • setAccess

      protected void setAccess(int bit, boolean set)
      Set the access byte.
    • canDestroy

      public boolean canDestroy()
      Indicates if this file may be destroyed.
    • setCanDestroy

      public void setCanDestroy(boolean destroy)
      Set if this file may be destroyed.
    • canRename

      public boolean canRename()
      Indicates if this file may be renamed.
    • setCanRename

      public void setCanRename(boolean rename)
      Set if this file may be renamed.
    • hasChanged

      public boolean hasChanged()
      Indicates if this file has changed since last backup.
    • setHasChanged

      public void setHasChanged(boolean changed)
      Set if this file has changed since last backup.
    • canWrite

      public boolean canWrite()
      Indicates if this file may be written.
    • setCanWrite

      public void setCanWrite(boolean write)
      Set if this file may be written.
    • canRead

      public boolean canRead()
      Indicates if this file may be read.
    • setCanRead

      public void setCanRead(boolean read)
      Set if this file may be read.
    • getFormattedDisk

      public FormattedDisk getFormattedDisk()
      Get the FormattedDisk associated with this FileEntry. This is useful to interfaces that need to retrieve the associated disk.