Class NakedosFileEntry
java.lang.Object
com.webcodepro.applecommander.storage.os.nakedos.NakedosFileEntry
- All Implemented Interfaces:
FileEntry
Represents a Nakedos file entry on disk.
Date created: August 5, 2010 10:23:23 AM
-
Constructor Summary
ConstructorsConstructorDescriptionNakedosFileEntry(NakedosFormatDisk disk, int fileNumber, int size) Constructor for NakedosFileEntry. -
Method Summary
Modifier and TypeMethodDescriptionvoiddelete()Delete this file (unimplemented).booleanintGet the address that this file loads at.getFileColumnData(int displayMode) Get the standard file column header information.byte[]Get file data.Return the name of this file.intReturn the name of this file.Return the filetype of this file.Get the FormattedDisk associated with this FileEntry.intReturn the maximum filename length.intgetSize()Compute the size of this file (in bytes).Get the suggested FileFilter.booleanIdentify if this file has been deleted.booleanIdentify if this is a directory file.booleanisLocked()Identify if this file is locked.booleanIndicates if this filetype requires an address component.voidsetAddress(int address) Set the address that this file loads at.voidsetFileData(byte[] data) Set the file data.voidsetFilename(String filename) Set the name of this file.voidsetFiletype(String filetype) Set the filetype (typeless - unused)voidsetLocked(boolean lock) Set the lock indicator (unused)
-
Constructor Details
-
NakedosFileEntry
Constructor for NakedosFileEntry.
-
-
Method Details
-
getFilename
Return the name of this file.- Specified by:
getFilenamein interfaceFileEntry- See Also:
-
getFileNumber
public int getFileNumber()Return the name of this file.- See Also:
-
setFilename
Set the name of this file.- Specified by:
setFilenamein interfaceFileEntry
-
getFiletype
Return the filetype of this file.- Specified by:
getFiletypein interfaceFileEntry- See Also:
-
setFiletype
Set the filetype (typeless - unused)- Specified by:
setFiletypein interfaceFileEntry
-
isLocked
public boolean isLocked()Identify if this file is locked. -
setLocked
public void setLocked(boolean lock) Set the lock indicator (unused) -
getSize
public int getSize()Compute the size of this file (in bytes). -
isDirectory
public boolean isDirectory()Identify if this is a directory file.- Specified by:
isDirectoryin interfaceFileEntry- See Also:
-
isDeleted
public boolean isDeleted()Identify if this file has been deleted. -
delete
public void delete()Delete this file (unimplemented). -
getFileColumnData
Get the standard file column header information. This default implementation is intended only for standard mode. displayMode is specified in FormattedDisk.- Specified by:
getFileColumnDatain interfaceFileEntry
-
getFileData
public byte[] getFileData()Get file data. This handles any operating-system specific issues.- Specified by:
getFileDatain interfaceFileEntry
-
setFileData
Set the file data. Note: The address can be set before the data is saved or after the data is saved. This is an attempt to make the API more easily usable. Empirically, the data must be set before the address is set.- Specified by:
setFileDatain interfaceFileEntry- Throws:
DiskFullException
-
getSuggestedFilter
Get the suggested FileFilter. This appears to be operating system specific, so each operating system needs to implement some manner of guessing the appropriate filter. FIXME - this code should be a helper class for DOS and RDOS!- Specified by:
getSuggestedFilterin interfaceFileEntry
-
getFormattedDisk
Get the FormattedDisk associated with this FileEntry. This is useful to interfaces that need to retrieve the associated disk.- Specified by:
getFormattedDiskin interfaceFileEntry
-
getMaximumFilenameLength
public int getMaximumFilenameLength()Return the maximum filename length.- Specified by:
getMaximumFilenameLengthin interfaceFileEntry
-
needsAddress
public boolean needsAddress()Indicates if this filetype requires an address component. Note that the FormattedDisk also has this method - normally, this will defer to the method on FormattedDisk, as it will be more generic.- Specified by:
needsAddressin interfaceFileEntry
-
setAddress
public void setAddress(int address) Set the address that this file loads at.- Specified by:
setAddressin interfaceFileEntry
-
getAddress
public int getAddress()Get the address that this file loads at.- Specified by:
getAddressin interfaceFileEntry
-
equals
-