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
Modifier and TypeMethodDescriptionvoid
delete()
Delete the file.int
Get 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.Return the filetype of this file.Get the FormattedDisk associated with this FileEntry.int
Return the maximum filename length.int
getSize()
Compute the size of this file (in bytes).Get the suggested FileFilter.boolean
Identify if this file has been deleted.boolean
Identify if this is a directory file.boolean
isLocked()
Identify if this file is locked.boolean
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
(String filename) Set the name of this file.void
setFiletype
(String filetype) Set the filetype.void
setLocked
(boolean lock) Set the lock indicator.
-
Method Details
-
getFilename
String getFilename()Return the name of this file. -
setFilename
Set the name of this file. -
getFiletype
String getFiletype()Return the filetype of this file. This will be OS specific. -
setFiletype
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
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
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.
-