com.webcodepro.applecommander.storage.os.prodos
Class ProdosDirectoryEntry

java.lang.Object
  extended by com.webcodepro.applecommander.storage.os.prodos.ProdosCommonEntry
      extended by com.webcodepro.applecommander.storage.os.prodos.ProdosFileEntry
          extended by com.webcodepro.applecommander.storage.os.prodos.ProdosDirectoryEntry
All Implemented Interfaces:
DirectoryEntry, FileEntry

public class ProdosDirectoryEntry
extends ProdosFileEntry
implements DirectoryEntry

Implement directory functionality.

Date Created: Mar 2, 2003

Author:
Rob Greene

Field Summary
 
Fields inherited from class com.webcodepro.applecommander.storage.os.prodos.ProdosCommonEntry
ENTRY_LENGTH
 
Constructor Summary
ProdosDirectoryEntry(ProdosFormatDisk disk, int block, int offset, ProdosSubdirectoryHeader subdirectoryHeader)
          Constructor for ProdosDirectoryEntry.
 
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.
 ProdosSubdirectoryHeader getSubdirectoryHeader()
          Get the subdirectory header.
 
Methods inherited from class com.webcodepro.applecommander.storage.os.prodos.ProdosFileEntry
canCompile, delete, getAuxiliaryType, getBlocksUsed, getEofPosition, getFileColumnData, getFileData, getFilename, getFiletype, getFiletypeByte, getFileTypeString, getHeaderPointer, getKeyPointer, getLastModificationDate, getMaximumFilenameLength, getSize, getSuggestedFilter, isAppleWorksFile, isDeleted, isDirectory, isLocked, needsAddress, setAddress, setAuxiliaryType, setAuxiliaryType, setBlocksUsed, setEofPosition, setFileData, setFilename, setFiletype, setHeaderPointer, setKeyPointer, setLastModificationDate, setLocked
 
Methods inherited from class com.webcodepro.applecommander.storage.os.prodos.ProdosCommonEntry
canDestroy, canRead, canRename, canWrite, getAccess, getCreationDate, getDisk, getFileEntryBlock, getFormattedDisk, getMinimumProdosVersion, getProdosVersion, getStorageType, hasChanged, isEmpty, isSaplingFile, isSeedlingFile, isSubdirectoryHeader, isTreeFile, isVolumeHeader, readFileEntry, setAccess, setCanDestroy, setCanRead, setCanRename, setCanWrite, setCreationDate, setHasChanged, setMinimumProdosVersion, setProdosVersion, setSaplingFile, setSeedlingFile, setStorageType, setSubdirectoryHeader, setTreeFile, setVolumeHeader, writeFileEntry
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.webcodepro.applecommander.storage.DirectoryEntry
getFormattedDisk
 
Methods inherited from interface com.webcodepro.applecommander.storage.FileEntry
getFormattedDisk
 

Constructor Detail

ProdosDirectoryEntry

public ProdosDirectoryEntry(ProdosFormatDisk disk,
                            int block,
                            int offset,
                            ProdosSubdirectoryHeader subdirectoryHeader)
Constructor for ProdosDirectoryEntry.

Method Detail

getSubdirectoryHeader

public ProdosSubdirectoryHeader getSubdirectoryHeader()
Get the subdirectory header.


getFiles

public 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.

Specified by:
getFiles in interface DirectoryEntry

createFile

public FileEntry createFile()
                     throws DiskFullException
Create a new FileEntry.

Specified by:
createFile in interface DirectoryEntry
Throws:
DiskFullException

canCreateDirectories

public 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.

Specified by:
canCreateDirectories in interface DirectoryEntry

canCreateFile

public 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.

Specified by:
canCreateFile in interface DirectoryEntry

createDirectory

public DirectoryEntry createDirectory()
                               throws DiskFullException
Create a new DirectoryEntry.

Specified by:
createDirectory in interface DirectoryEntry
Throws:
DiskFullException
See Also:
DirectoryEntry.createDirectory()