mirror of
https://github.com/AppleCommander/AppleCommander.git
synced 2025-01-24 12:32:40 +00:00
Added needsAddress and setAddress.
This commit is contained in:
parent
d5089727f9
commit
ecf6f16a83
@ -430,4 +430,21 @@ public class DosFileEntry implements FileEntry {
|
||||
public FormattedDisk getFormattedDisk() {
|
||||
return disk;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
public boolean needsAddress() {
|
||||
return disk.needsAddress(getFiletype());
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the address that this file loads at.
|
||||
*/
|
||||
public void setAddress(int address) {
|
||||
// FIXME - need to implement
|
||||
}
|
||||
}
|
||||
|
@ -126,4 +126,17 @@ public interface FileEntry {
|
||||
* Return the maximum filename length.
|
||||
*/
|
||||
public int getMaximumFilenameLength();
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
public abstract boolean needsAddress();
|
||||
|
||||
/**
|
||||
* Set the address that this file loads at.
|
||||
*/
|
||||
public abstract void setAddress(int address);
|
||||
}
|
||||
|
@ -83,15 +83,7 @@ public class PascalFileEntry implements FileEntry {
|
||||
* Return the filetype of this file.
|
||||
*/
|
||||
public String getFiletype() {
|
||||
String filetypes[] = {
|
||||
"xdskfile (for bad blocks)",
|
||||
"codefile",
|
||||
"textfile",
|
||||
"infofile",
|
||||
"datafile",
|
||||
"graffile",
|
||||
"fotofile",
|
||||
"securedir" };
|
||||
String[] filetypes = disk.getFiletypes();
|
||||
int filetype = fileEntry[4] & 0x0f;
|
||||
if (filetype == 0 || filetype > filetypes.length) {
|
||||
return "unknown (" + filetype + ")";
|
||||
@ -257,4 +249,21 @@ public class PascalFileEntry implements FileEntry {
|
||||
public FormattedDisk getFormattedDisk() {
|
||||
return disk;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
public boolean needsAddress() {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the address that this file loads at.
|
||||
*/
|
||||
public void setAddress(int address) {
|
||||
// Does not apply.
|
||||
}
|
||||
}
|
||||
|
@ -288,4 +288,21 @@ public class RdosFileEntry implements FileEntry {
|
||||
public FormattedDisk getFormattedDisk() {
|
||||
return disk;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
public boolean needsAddress() {
|
||||
return disk.needsAddress(getFiletype());
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the address that this file loads at.
|
||||
*/
|
||||
public void setAddress(int address) {
|
||||
// FIXME - need to implement
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user