Class RDOSFileEntry
java.lang.Object
org.applecommander.os.rdos.RDOSFileEntry
- All Implemented Interfaces:
FileEntry, WritableFileEntry, RDOSConstants, Container
-
Field Summary
Fields inherited from interface RDOSConstants
ADDRESS_OFFSET, BLOCKS_OFFSET, CAPABILITIES, ENTRY_LENGTH, FILE_NAME_MAPPER, FIRST_BLOCK_OFFSET, LENGTH_OFFSET, NAME_LENGTH, NAME_OFFSET, TYPE_OFFSET -
Method Summary
Modifier and TypeMethodDescription<T> Optional<T> intintReturn the file's data.intintReturns theFileStorethat thisEntryoriginates from.intgetName()Returns the name of this entry: either a directory name or a file name.TheDirectorythat holds this file.Interpret theFileEntryas if it were on a ProDOS volume.longgetSize()Returns the size, in bytes, of this item.getType()booleanIndicates if thisFileEntryis deleted.voidmodifyEntry(Consumer<DataBuffer> consumer) voidsetAddress(int addr) voidsetBlocks(int blocks) voidsetDataFork(DataBuffer data) Store the file's data.voidsetFirstBlock(int firstBlock) voidAllows the name of this entry to be changed (depending on theCapabilityallowed by the underlyingFileStore).voidsetSize(int size) voidMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface FileEntry
getContentType, getResourceForkMethods inherited from interface WritableFileEntry
setResourceFork
-
Method Details
-
readEntry
-
modifyEntry
-
getDirectoryBlock
public int getDirectoryBlock() -
getDirectoryOffset
public int getDirectoryOffset() -
getParent
TheDirectorythat holds this file. -
isDeleted
-
getFileStore
Returns theFileStorethat thisEntryoriginates from.- Specified by:
getFileStorein interfaceFileEntry
-
getName
-
setName
Description copied from interface:WritableFileEntryAllows the name of this entry to be changed (depending on theCapabilityallowed by the underlyingFileStore).- Specified by:
setNamein interfaceWritableFileEntry
-
getType
-
setType
-
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
-
setSize
public void setSize(int size) -
getDataFork
Return the file's data. This does not include any metadata that may be embedded with the file.- Specified by:
getDataForkin interfaceFileEntry
-
getProdosAttributes
Interpret theFileEntryas 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:
getProdosAttributesin interfaceFileEntry
-
get
-
setDataFork
Store the file's data. This does not include any metadata that may be embedded with the file.- Specified by:
setDataForkin interfaceWritableFileEntry
-