Interface FileEntry
-
- All Known Implementing Classes:
CpmFileEntry,DosFileEntry,GutenbergFileEntry,NakedosFileEntry,PascalFileEntry,ProdosDirectoryEntry,ProdosFileEntry,RdosFileEntry
public interface FileEntryRepresents a file entry on disk - not the data.Date created: Oct 4, 2002 4:46:42 PM
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancanCompile()Indicates that this filetype can be compiled.voiddelete()Delete the file.intgetAddress()Get the address that this file loads at.java.util.List<java.lang.String>getFileColumnData(int displayMode)Get the standard file column header information.byte[]getFileData()Get file data.java.lang.StringgetFilename()Return the name of this file.java.lang.StringgetFiletype()Return the filetype of this file.FormattedDiskgetFormattedDisk()Get the FormattedDisk associated with this FileEntry.intgetMaximumFilenameLength()Return the maximum filename length.intgetSize()Compute the size of this file (in bytes).FileFiltergetSuggestedFilter()Get the suggested FileFilter.booleanisDeleted()Identify if this file has been deleted.booleanisDirectory()Identify if this is a directory file.booleanisLocked()Identify if this file is locked.booleanneedsAddress()Indicates if this filetype requires an address component.voidsetAddress(int address)Set the address that this file loads at.voidsetFileData(byte[] data)Set file data.voidsetFilename(java.lang.String filename)Set the name of this file.voidsetFiletype(java.lang.String filetype)Set the filetype.voidsetLocked(boolean lock)Set the lock indicator.
-
-
-
Method Detail
-
getFilename
java.lang.String getFilename()
Return the name of this file.
-
setFilename
void setFilename(java.lang.String filename)
Set the name of this file.
-
getFiletype
java.lang.String getFiletype()
Return the filetype of this file. This will be OS specific.
-
setFiletype
void setFiletype(java.lang.String filetype)
Set the filetype.
-
isLocked
boolean isLocked()
Identify if this file is locked.
-
setLocked
void setLocked(boolean lock)
Set the lock indicator.
-
getSize
int getSize()
Compute the size of this file (in bytes).
-
isDirectory
boolean isDirectory()
Identify if this is a directory file.
-
isDeleted
boolean isDeleted()
Identify if this file has been deleted.
-
delete
void delete()
Delete the file.
-
getFileColumnData
java.util.List<java.lang.String> getFileColumnData(int displayMode)
Get the standard file column header information. This default implementation is intended only for standard mode. displayMode is specified in FormattedDisk.
-
getFileData
byte[] getFileData()
Get file data. This handles any operating-system specific issues. Specifically, DOS 3.3 places address and length into binary files and length into Applesoft files.
-
setFileData
void setFileData(byte[] data) throws DiskFullExceptionSet file data. This, essentially, is saving data to disk using this file entry.- Throws:
DiskFullException
-
getSuggestedFilter
FileFilter 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.
-
getFormattedDisk
FormattedDisk getFormattedDisk()
Get the FormattedDisk associated with this FileEntry. This is useful to interfaces that need to retrieve the associated disk.
-
getMaximumFilenameLength
int getMaximumFilenameLength()
Return the maximum filename length.
-
needsAddress
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.
-
setAddress
void setAddress(int address)
Set the address that this file loads at.
-
getAddress
int getAddress()
Get the address that this file loads at.
-
canCompile
boolean canCompile()
Indicates that this filetype can be compiled. Compile is a somewhat arbitrary term, as the code may be assembled. NOTE: The current assumption is that the filetype is AppleSoft. This should be updated to include Integer BASIC, assembly, and potentially other languages.
-
-