Class ProdosDirectoryEntry
- java.lang.Object
-
- com.webcodepro.applecommander.storage.os.prodos.ProdosCommonEntry
-
- com.webcodepro.applecommander.storage.os.prodos.ProdosFileEntry
-
- 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
-
-
Field Summary
-
Fields inherited from class com.webcodepro.applecommander.storage.os.prodos.ProdosCommonEntry
ENTRY_LENGTH
-
-
Constructor Summary
Constructors Constructor Description ProdosDirectoryEntry(ProdosFormatDisk disk, int block, int offset, ProdosSubdirectoryHeader subdirectoryHeader)
Constructor for ProdosDirectoryEntry.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canCreateDirectories()
Identify if additional directories can be created.boolean
canCreateFile()
Indicates if this disk image can create a file.DirectoryEntry
createDirectory(java.lang.String name)
Create a new DirectoryEntry.ProdosFileEntry
createFile()
Create a new FileEntry.java.lang.String
getDirname()
Return a name for this directory.java.util.List<FileEntry>
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, getAddress, getAuxiliaryType, getBlocksUsed, getEofPosition, getFileColumnData, getFileData, getFilename, getFiletype, getFiletypeByte, getFileTypeString, getHeaderPointer, getKeyPointer, getLastModificationDate, getMaximumFilenameLength, getSize, getSuggestedFilter, isAppleWorksFile, isDeleted, isDirectory, isForkedFile, isGEOSFile, isLocked, needsAddress, setAddress, setAuxiliaryType, setAuxiliaryType, setAuxiliaryType, setBlocksUsed, setEofPosition, setFileData, setFileData, setFilename, setFiletype, setFiletype, setGEOSMeta, 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, isSubdirectory, isSubdirectoryHeader, isTreeFile, isVolumeHeader, readFileEntry, setAccess, setCanDestroy, setCanRead, setCanRename, setCanWrite, setCreationDate, setHasChanged, setMinimumProdosVersion, setProdosVersion, setSaplingFile, setSeedlingFile, setStorageType, setSubdirectory, 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.
-
getDirname
public java.lang.String getDirname()
Return a name for this directory.- Specified by:
getDirname
in interfaceDirectoryEntry
-
getFiles
public java.util.List<FileEntry> getFiles() throws DiskException
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 interfaceDirectoryEntry
- Throws:
DiskException
-
createFile
public ProdosFileEntry createFile() throws DiskFullException
Create a new FileEntry.- Specified by:
createFile
in interfaceDirectoryEntry
- 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 interfaceDirectoryEntry
-
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 been implemented to something specific about the disk.- Specified by:
canCreateFile
in interfaceDirectoryEntry
-
createDirectory
public DirectoryEntry createDirectory(java.lang.String name) throws DiskFullException
Create a new DirectoryEntry.- Specified by:
createDirectory
in interfaceDirectoryEntry
- Throws:
DiskFullException
- See Also:
DirectoryEntry.createDirectory(String)
-
-