Interface FileEntry
-
- All Known Implementing Classes:
CpmFileEntry
,DosFileEntry
,GutenbergFileEntry
,NakedosFileEntry
,PascalFileEntry
,ProdosDirectoryEntry
,ProdosFileEntry
,RdosFileEntry
public interface FileEntry
Represents 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 boolean
canCompile()
Indicates that this filetype can be compiled.void
delete()
Delete the file.int
getAddress()
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.String
getFilename()
Return the name of this file.java.lang.String
getFiletype()
Return the filetype of this file.FormattedDisk
getFormattedDisk()
Get the FormattedDisk associated with this FileEntry.int
getMaximumFilenameLength()
Return the maximum filename length.int
getSize()
Compute the size of this file (in bytes).FileFilter
getSuggestedFilter()
Get the suggested FileFilter.boolean
isDeleted()
Identify if this file has been deleted.boolean
isDirectory()
Identify if this is a directory file.boolean
isLocked()
Identify if this file is locked.boolean
needsAddress()
Indicates if this filetype requires an address component.void
setAddress(int address)
Set the address that this file loads at.void
setFileData(byte[] data)
Set file data.void
setFilename(java.lang.String filename)
Set the name of this file.void
setFiletype(java.lang.String filetype)
Set the filetype.void
setLocked(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 DiskFullException
Set 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.
-
-