From 74a45b9f68ce5b2752b40f72cdac2e86483c7d7b Mon Sep 17 00:00:00 2001 From: Robert Greene Date: Sun, 26 Jan 2003 02:40:04 +0000 Subject: [PATCH] Added getSuggestedFilename and a null createFile (to get rid of error messages; will be implemented later). Minor comment fix. --- .../storage/RdosFormatDisk.java | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/com/webcodepro/applecommander/storage/RdosFormatDisk.java b/src/com/webcodepro/applecommander/storage/RdosFormatDisk.java index 41c5ef1..ce67def 100644 --- a/src/com/webcodepro/applecommander/storage/RdosFormatDisk.java +++ b/src/com/webcodepro/applecommander/storage/RdosFormatDisk.java @@ -194,6 +194,14 @@ public class RdosFormatDisk extends FormattedDisk { return files; } + /** + * Create a new FileEntry. + */ + public FileEntry createFile() throws DiskFullException { + // FIXME: Need to implement! + return null; + } + /** * Identify the operating system format of this disk. */ @@ -362,7 +370,7 @@ public class RdosFormatDisk extends FormattedDisk { /** * Format the disk as an RDOS disk. * FIXME - RDOS does not "like" an AppleCommander formatted disk. - * This appears to be because the &CAT command command + * This appears to be because the &CAT command * reads from track 1 sector 9 (whatever RDOS block that * would be) and executes that code for the directory. * AppleCommander will need to either clone the code or write @@ -398,4 +406,13 @@ public class RdosFormatDisk extends FormattedDisk { public int getLogicalDiskNumber() { return 0; } + + /** + * Returns a valid filename for the given filename. RDOS + * pretty much allows anything - so it is cut to 24 characters + * and trimmed (trailing whitespace may cause confusion). + */ + public String getSuggestedFilename(String filename) { + return filename.toUpperCase().substring(0, 24).trim(); + } }