diff --git a/src/com/webcodepro/applecommander/storage/DosFormatDisk.java b/src/com/webcodepro/applecommander/storage/DosFormatDisk.java index c05c9b1..c745d69 100644 --- a/src/com/webcodepro/applecommander/storage/DosFormatDisk.java +++ b/src/com/webcodepro/applecommander/storage/DosFormatDisk.java @@ -170,12 +170,23 @@ public class DosFormatDisk extends FormattedDisk { } /** - * Identify if this disk format as not capable of having directories. - * @see com.webcodepro.applecommander.storage.Disk#hasDirectories() + * Identify if additional directories can be created. This + * may indicate that directories are not available to this + * operating system or simply that the disk image is "locked" + * to writing. */ - public boolean canHaveDirectories() { + public boolean canCreateDirectories() { return false; } + + /** + * Indicates if this disk image can create a file. + * If not, the reason may be as simple as it has not beem implemented + * to something specific about the disk. + */ + public boolean canCreateFile() { + return true; + } /** * Compute the amount of freespace available on the disk. @@ -361,10 +372,11 @@ public class DosFormatDisk extends FormattedDisk { } /** - * Indicates if this disk image can create a file. + * Identify if this disk format as not capable of having directories. + * @see com.webcodepro.applecommander.storage.Disk#hasDirectories() */ - public boolean canCreateFile() { - return true; + public boolean canHaveDirectories() { + return false; } /** diff --git a/src/com/webcodepro/applecommander/storage/PascalFormatDisk.java b/src/com/webcodepro/applecommander/storage/PascalFormatDisk.java index 2e5060b..4340c6a 100644 --- a/src/com/webcodepro/applecommander/storage/PascalFormatDisk.java +++ b/src/com/webcodepro/applecommander/storage/PascalFormatDisk.java @@ -154,8 +154,26 @@ public class PascalFormatDisk extends FormattedDisk { * Create a new FileEntry. */ public FileEntry createFile() throws DiskFullException { - // FIXME: Need to implement! - return null; + throw new DiskFullException("Unable to create files (yet)."); + } + + /** + * Identify if additional directories can be created. This + * may indicate that directories are not available to this + * operating system or simply that the disk image is "locked" + * to writing. + */ + public boolean canCreateDirectories() { + return false; + } + + /** + * Indicates if this disk image can create a file. + * If not, the reason may be as simple as it has not beem implemented + * to something specific about the disk. + */ + public boolean canCreateFile() { + return false; } /** @@ -389,13 +407,6 @@ public class PascalFormatDisk extends FormattedDisk { return false; // FIXME - not implemented } - /** - * Indicates if this disk image can create a file. - */ - public boolean canCreateFile() { - return false; // FIXME - not implemented - } - /** * Indicates if this disk image can delete a file. */ diff --git a/src/com/webcodepro/applecommander/storage/RdosFormatDisk.java b/src/com/webcodepro/applecommander/storage/RdosFormatDisk.java index 255ca61..8238ce8 100644 --- a/src/com/webcodepro/applecommander/storage/RdosFormatDisk.java +++ b/src/com/webcodepro/applecommander/storage/RdosFormatDisk.java @@ -164,13 +164,6 @@ public class RdosFormatDisk extends FormattedDisk { writeSector(track, sector, data); } - /** - * RDOS dos not support directories. - */ - public boolean canHaveDirectories() { - return false; - } - /** * RDOS really does not have a disk name. Fake one. */ @@ -202,8 +195,26 @@ public class RdosFormatDisk extends FormattedDisk { * Create a new FileEntry. */ public FileEntry createFile() throws DiskFullException { - // FIXME: Need to implement! - return null; + throw new DiskFullException("Cannot create a file (yet)."); + } + + /** + * Identify if additional directories can be created. This + * may indicate that directories are not available to this + * operating system or simply that the disk image is "locked" + * to writing. + */ + public boolean canCreateDirectories() { + return false; + } + + /** + * Indicates if this disk image can create a file. + * If not, the reason may be as simple as it has not beem implemented + * to something specific about the disk. + */ + public boolean canCreateFile() { + return false; // FIXME - need to implement } /** @@ -339,12 +350,12 @@ public class RdosFormatDisk extends FormattedDisk { } /** - * Indicates if this disk image can create a file. + * RDOS dos not support directories. */ - public boolean canCreateFile() { - return false; // FIXME - not implemented + public boolean canHaveDirectories() { + return false; } - + /** * Indicates if this disk image can delete a file. */