Class PascalFileEntry
java.lang.Object
org.applecommander.os.pascal.PascalFileEntry
- All Implemented Interfaces:
FileEntry, WritableFileEntry, PascalConstants, Container
-
Field Summary
Fields inherited from interface PascalConstants
BAD, CAPABILITIES, DIRECTORY_BLOCKS, DIRECTORY_FIRST_BLOCK, DIRECTORY_LAST_BLOCK, ENTRY_FIRST_BLOCK, ENTRY_LAST_BLOCK, ENTRY_LENGTH, ENTRY_NAME, ENTRY_TYPE, FILE_BYTES_USED_IN_LAST_BLOCK, FILE_MODIFICATION_DATE, FILE_NAME_LENGTH, FILE_NAME_MAPPER, MAX_DIRECTORY_BYTES, MAX_DIRECTORY_ENTRIES, PCD, PDA, PTX, VOLUME_BLOCKS_ON_DISK, VOLUME_FILES_ON_DISK, VOLUME_NAME_LENGTH, VOLUME_NAME_MAPPER, VOLUME_RECENT_DATE -
Method Summary
Modifier and TypeMethodDescription<T> Optional<T> intintReturn the file's data.Returns theFileStorethat thisEntryoriginates from.intGet the block number of the files first block.intGet the block number of the files last block + 1.getName()Returns the name of this entry: either a directory name or a file name.intTheDirectorythat 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) voidsetBytesUsedInLastBlock(int bytesUsedInLastBlock) voidsetDataFork(DataBuffer data) Store the file's data.voidsetFirstBlock(int firstBlock) voidsetLastBlock(int lastBlock) voidsetLastModified(Date lastModified) voidSets the name of this file.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
-
getOffset
public int getOffset() -
readEntry
-
modifyEntry
-
getParent
-
isDeleted
-
getFileStore
Returns theFileStorethat thisEntryoriginates from.- Specified by:
getFileStorein interfaceFileEntry
-
getName
-
setName
Sets the name of this file. Uses theNAME_MAPPERto fix characters. This method only errors if, after applying the rules, the string is empty.- Specified by:
setNamein interfaceWritableFileEntry
-
setDataFork
Store the file's data. This does not include any metadata that may be embedded with the file.- Specified by:
setDataForkin interfaceWritableFileEntry
-
getFirstBlock
public int getFirstBlock()Get the block number of the files first block. -
setFirstBlock
public void setFirstBlock(int firstBlock) -
getLastBlock
public int getLastBlock()Get the block number of the files last block + 1. -
setLastBlock
public void setLastBlock(int lastBlock) -
getBlocksUsed
public int getBlocksUsed() -
getType
-
setType
-
getBytesUsedInLastBlock
public int getBytesUsedInLastBlock() -
setBytesUsedInLastBlock
public void setBytesUsedInLastBlock(int bytesUsedInLastBlock) -
getLastModified
-
setLastModified
-
getSize
-
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
-