Class ProdosCommonEntry
java.lang.Object
com.webcodepro.applecommander.storage.os.prodos.ProdosCommonEntry
- Direct Known Subclasses:
ProdosCommonDirectoryHeader,ProdosFileEntry
Represents the common Prodos entry behavior.
Date created: Oct 5, 2002 10:55:41 PM
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe standard ProDOS file entry length. -
Constructor Summary
ConstructorsConstructorDescriptionProdosCommonEntry(ProdosFormatDisk disk, int block, int offset) Constructor for ProdosCommonEntry. -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates if this file may be destroyed.booleancanRead()Indicates if this file may be read.booleanIndicates if this file may be renamed.booleancanWrite()Indicates if this file may be written.protected byteGet the access byte.Get the creation date.protected ProdosFormatDiskgetDisk()Get the ProdosFormatDisk that this FileEntry is attached to.protected intGet the block in which the FileEntry resides.Get the FormattedDisk associated with this FileEntry.intGet the minimum version of ProDOS which can access this file.intGet the version of ProDOS that created this file.protected intGet storage type.booleanIndicates if this file has changed since last backup.booleanisEmpty()Indicates if this entry is empty - filled with $00.booleanIndicates if this is a "sapling" file (2 to 256 data blocks).booleanIndicates if this is a "seedling" file (only one data block).booleanIndicates if this is a subdirectory entry.booleanIndicates if this is a subdirectory header entry.booleanIndicates if this is a "tree" file (257 to 32768 data blocks).booleanIndicates if this is a volume header entry.protected byte[]Read the fileEntry bytes from the disk image.protected voidsetAccess(int bit, boolean set) Set the access byte.voidsetCanDestroy(boolean destroy) Set if this file may be destroyed.voidsetCanRead(boolean read) Set if this file may be read.voidsetCanRename(boolean rename) Set if this file may be renamed.voidsetCanWrite(boolean write) Set if this file may be written.voidsetCreationDate(Date date) Set the creation date.voidsetHasChanged(boolean changed) Set if this file has changed since last backup.voidsetMinimumProdosVersion(int version) Set the minimum version of ProDOS which can access this file.voidsetProdosVersion(int version) Set the version of ProDOS that created this file.voidSets the storage type to a "sapling" file (2 to 256 data blocks).voidSets the storage type to a "seedling" file (only one data block).voidsetStorageType(int storageType) Set the storage type.voidSets the storage type to a subdirectory entry.voidSets the storage type to a subdirectory header entry.voidSets the storage type to a "tree" file (257 to 32768 data blocks).voidSets the storage type to a volume header entry.protected voidwriteFileEntry(byte[] entry) Write the fileEntry data to the disk image.
-
Field Details
-
ENTRY_LENGTH
public static final int ENTRY_LENGTHThe standard ProDOS file entry length.- See Also:
-
-
Constructor Details
-
ProdosCommonEntry
Constructor for ProdosCommonEntry.
-
-
Method Details
-
getFileEntryBlock
protected int getFileEntryBlock()Get the block in which the FileEntry resides. -
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
Get the creation date. -
setCreationDate
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
Get the FormattedDisk associated with this FileEntry. This is useful to interfaces that need to retrieve the associated disk.
-