From e35d41f3365e5af9eef43151060d3f5965a70af4 Mon Sep 17 00:00:00 2001 From: Robert Greene Date: Sun, 15 Dec 2002 21:00:35 +0000 Subject: [PATCH] Added getFormattedDisk. --- .../webcodepro/applecommander/storage/DosFileEntry.java | 9 +++++++++ src/com/webcodepro/applecommander/storage/FileEntry.java | 7 +++++++ .../applecommander/storage/PascalFileEntry.java | 8 ++++++++ .../applecommander/storage/ProdosCommonEntry.java | 9 +++++++++ .../webcodepro/applecommander/storage/RdosFileEntry.java | 9 +++++++++ 5 files changed, 42 insertions(+) diff --git a/src/com/webcodepro/applecommander/storage/DosFileEntry.java b/src/com/webcodepro/applecommander/storage/DosFileEntry.java index a5ab69a..58a3286 100644 --- a/src/com/webcodepro/applecommander/storage/DosFileEntry.java +++ b/src/com/webcodepro/applecommander/storage/DosFileEntry.java @@ -268,4 +268,13 @@ public class DosFileEntry implements FileEntry { public boolean isBinaryFile() { return "B".equals(getFiletype()); } + + /** + * Get the FormattedDisk associated with this FileEntry. + * This is useful to interfaces that need to retrieve the associated + * disk. + */ + public FormattedDisk getFormattedDisk() { + return disk; + } } diff --git a/src/com/webcodepro/applecommander/storage/FileEntry.java b/src/com/webcodepro/applecommander/storage/FileEntry.java index 854da45..f1d9892 100644 --- a/src/com/webcodepro/applecommander/storage/FileEntry.java +++ b/src/com/webcodepro/applecommander/storage/FileEntry.java @@ -88,4 +88,11 @@ public interface FileEntry { * of guessing the appropriate filter. */ public FileFilter getSuggestedFilter(); + + /** + * Get the FormattedDisk associated with this FileEntry. + * This is useful to interfaces that need to retrieve the associated + * disk. + */ + public FormattedDisk getFormattedDisk(); } diff --git a/src/com/webcodepro/applecommander/storage/PascalFileEntry.java b/src/com/webcodepro/applecommander/storage/PascalFileEntry.java index 410aaf2..619ab4d 100644 --- a/src/com/webcodepro/applecommander/storage/PascalFileEntry.java +++ b/src/com/webcodepro/applecommander/storage/PascalFileEntry.java @@ -206,4 +206,12 @@ public class PascalFileEntry implements FileEntry { return new BinaryFileFilter(); } + /** + * Get the FormattedDisk associated with this FileEntry. + * This is useful to interfaces that need to retrieve the associated + * disk. + */ + public FormattedDisk getFormattedDisk() { + return disk; + } } diff --git a/src/com/webcodepro/applecommander/storage/ProdosCommonEntry.java b/src/com/webcodepro/applecommander/storage/ProdosCommonEntry.java index 72c87aa..250abda 100644 --- a/src/com/webcodepro/applecommander/storage/ProdosCommonEntry.java +++ b/src/com/webcodepro/applecommander/storage/ProdosCommonEntry.java @@ -308,4 +308,13 @@ public class ProdosCommonEntry { public void setRead(boolean read) { setAccess(0, read); } + + /** + * Get the FormattedDisk associated with this FileEntry. + * This is useful to interfaces that need to retrieve the associated + * disk. + */ + public FormattedDisk getFormattedDisk() { + return disk; + } } diff --git a/src/com/webcodepro/applecommander/storage/RdosFileEntry.java b/src/com/webcodepro/applecommander/storage/RdosFileEntry.java index c7770f2..11f09eb 100644 --- a/src/com/webcodepro/applecommander/storage/RdosFileEntry.java +++ b/src/com/webcodepro/applecommander/storage/RdosFileEntry.java @@ -236,4 +236,13 @@ public class RdosFileEntry implements FileEntry { public boolean isBinaryFile() { return "B".equals(getFiletype()); } + + /** + * Get the FormattedDisk associated with this FileEntry. + * This is useful to interfaces that need to retrieve the associated + * disk. + */ + public FormattedDisk getFormattedDisk() { + return disk; + } }