Class DiskFileStoreAdapter.DiskDirectoryAdapter
java.lang.Object
com.webcodepro.applecommander.storage.DiskFileStoreAdapter.DiskDirectoryAdapter
- All Implemented Interfaces:
CapabilityProvider, Directory, WritableDirectory
- Enclosing class:
DiskFileStoreAdapter
public static class DiskFileStoreAdapter.DiskDirectoryAdapter
extends Object
implements WritableDirectory
The
DiskDirectoryEntryAdapter is a shim that allows a FormattedDisk or DirectoryEntry to be mapped into the
new/evolving Directory / WritableDirectory and associated interface(s).- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDiskDirectoryAdapter(DiskFileStoreAdapter adapter, DiskFileStoreAdapter.DiskDirectoryAdapter parent, DirectoryEntry directoryEntry) -
Method Summary
Modifier and TypeMethodDescriptionbooleancan(Capability capability) Helps identify capabilities of the existing component.createDirectory(String directoryName) Create a directory.createFile(String fileName) Create a file.createFrom(ProdosAttributes prodosAttributes) Create a file given the supplied ProDOS attributes.voiddeleteFile(FileEntry fileEntry) Delete a file.getFiles()Return all entries that are stored in this directory.Returns the FileStore that this Directory belongs to.getName()Returns the name of this directory.Get the parent directory.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Directory
findFile, getDirectories
-
Constructor Details
-
DiskDirectoryAdapter
public DiskDirectoryAdapter(DiskFileStoreAdapter adapter, DiskFileStoreAdapter.DiskDirectoryAdapter parent, DirectoryEntry directoryEntry)
-
-
Method Details
-
can
Description copied from interface:CapabilityProviderHelps identify capabilities of the existing component.- Specified by:
canin interfaceCapabilityProvider
-
getParent
-
getFiles
-
getFileStore
Description copied from interface:DirectoryReturns the FileStore that this Directory belongs to.- Specified by:
getFileStorein interfaceDirectory
-
getName
-
createDirectory
Description copied from interface:WritableDirectoryCreate a directory. By definition, any directory create is aWritableDirectory.- Specified by:
createDirectoryin interfaceWritableDirectory- See Also:
-
createFile
Description copied from interface:WritableDirectoryCreate a file. By definition, any file created is aWritableFileEntry.- Specified by:
createFilein interfaceWritableDirectory- See Also:
-
createFrom
Description copied from interface:WritableDirectoryCreate a file given the supplied ProDOS attributes. This is expected to handle setting all appropriateFileEntryattributes that align. File type should be converted, dates applied, etc.- Specified by:
createFromin interfaceWritableDirectory- See Also:
-
deleteFile
Description copied from interface:WritableDirectoryDelete a file.- Specified by:
deleteFilein interfaceWritableDirectory- See Also:
-