Class GamedosFileEntry
java.lang.Object
org.applecommander.os.gamedos.GamedosFileEntry
- All Implemented Interfaces:
FileEntry, WritableFileEntry, GamedosConstants, Container
-
Field Summary
Fields inherited from interface GamedosConstants
CAPABILITIES, DIRECTORY_SECTOR, DIRECTORY_SIZE, DIRECTORY_TRACK, ENTRY_META_OFFSET, ENTRY_NAME_LENGTH, ENTRY_NAME_OFFSET, ENTRY_SECTOR_OFFSET, ENTRY_SECTORS_OFFSET, ENTRY_SIZE, ENTRY_TRACK_OFFSET, ENTRY_TYPE_OFFSET, MARKER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> Optional<T> Return the file's data.Returns theFileStorethat thisEntryoriginates from.intintintgetMeta()getName()Returns the name of this entry: either a directory name or a file name.The parentDirectory, if applicable.Interpret theFileEntryas if it were on a ProDOS volume.intlonggetSize()Returns the size, in bytes, of this item.booleanIndicates if thisFileEntryis deleted.voidmodifyEntry(Consumer<DataBuffer> consumer) voidsetDataFork(DataBuffer data) Store the file's data.voidsetFiletype(String filetype) voidsetFirstSector(int sector) voidsetFirstTrack(int track) voidsetMeta(int meta) voidAllows the name of this entry to be changed (depending on theCapabilityallowed by the underlyingFileStore).voidsetSectorCount(int sectorCount) Methods 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
-
Constructor Details
-
GamedosFileEntry
-
-
Method Details
-
readEntry
-
modifyEntry
-
getParent
-
isDeleted
-
getFileStore
Description copied from interface:FileEntryReturns theFileStorethat thisEntryoriginates from.- Specified by:
getFileStorein interfaceFileEntry
-
getName
Description copied from interface:FileEntryReturns 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. -
setName
Description copied from interface:WritableFileEntryAllows the name of this entry to be changed (depending on theCapabilityallowed by the underlyingFileStore).- Specified by:
setNamein interfaceWritableFileEntry
-
getSize
-
getFiletype
-
setFiletype
-
getFirstTrack
public int getFirstTrack() -
setFirstTrack
public void setFirstTrack(int track) -
getFirstSector
public int getFirstSector() -
setFirstSector
public void setFirstSector(int sector) -
getMeta
public int getMeta() -
setMeta
public void setMeta(int meta) -
getSectorCount
public int getSectorCount() -
setSectorCount
public void setSectorCount(int sectorCount) -
getDataFork
Description copied from interface:FileEntryReturn the file's data. This does not include any metadata that may be embedded with the file.- Specified by:
getDataForkin interfaceFileEntry
-
setDataFork
Description copied from interface:WritableFileEntryStore the file's data. This does not include any metadata that may be embedded with the file.- Specified by:
setDataForkin interfaceWritableFileEntry
-
getProdosAttributes
Description copied from interface:FileEntryInterpret 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
-