com.webcodepro.applecommander.storage
Interface DirectoryEntry

All Known Implementing Classes:
CpmFormatDisk, DosFormatDisk, FormattedDisk, OzDosFormatDisk, PascalFormatDisk, ProdosDirectoryEntry, ProdosFormatDisk, RdosFormatDisk, UniDosFormatDisk

public interface DirectoryEntry

Represents a directory on disk. This could be the main catalog or an actual directory. (FormattedDisk implements DirectoryEntry.)

Date Created: Mar 2, 2003

Author:
Rob Greene

Method Summary
 boolean canCreateDirectories()
          Identify if additional directories can be created.
 boolean canCreateFile()
          Indicates if this disk image can create a file.
 DirectoryEntry createDirectory()
          Create a new DirectoryEntry.
 FileEntry createFile()
          Create a new FileEntry.
 java.util.List getFiles()
          Retrieve the list of files in this directory.
 FormattedDisk getFormattedDisk()
          Get the FormattedDisk associated with this DirectoryEntry.
 

Method Detail

getFiles

java.util.List getFiles()
Retrieve the list of files in this directory. Note that if this is not a directory, the return value should be null. If this a directory, the return value should always be a list - a directory with 0 entries returns an empty list.


createFile

FileEntry createFile()
                     throws DiskFullException
Create a new FileEntry.

Throws:
DiskFullException

createDirectory

DirectoryEntry createDirectory()
                               throws DiskFullException
Create a new DirectoryEntry.

Throws:
DiskFullException

canCreateDirectories

boolean canCreateDirectories()
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.


canCreateFile

boolean canCreateFile()
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.


getFormattedDisk

FormattedDisk getFormattedDisk()
Get the FormattedDisk associated with this DirectoryEntry. This is useful to interfaces that need to retrieve the associated disk.