Interface FileStoreFactory
- All Known Implementing Classes:
AppleArchiveFormatFileStoreFactory, BinaryIIFileStoreFactory, BinsciiFileStoreFactory, DiskFileStoreFactory, GamedosFileStoreFactory, PascalFileStoreFactory, RDOSFileStoreFactory, ShrinkitFileStoreFactory, ZipFileStoreFactory
public interface FileStoreFactory
The FileStoreFactory inspects a given Source to see if it matches any known file store(s).
Invoke via FileStores.inspect(Source) which will return a Context. The Context can be empty.
If this is the case, devices can be created via the FileStoreFactory.Context.blockDevice() and
FileStoreFactory.Context.trackSectorDevice() builders.
The builders follow the observation about what each filesystem currently uses:
| OS | 13-sector | 16-sector | 800K | HDV |
|---|---|---|---|---|
| CP/M | - | CP/M | - | - |
| DOS | Physical | DOS | Pascal | - |
| GameDOS | - | DOS | - | - |
| Gutenberg | - | DOS | - | - |
| NakedOS | - | Physical | - | - |
| Pascal | - | Pascal | Pascal | Pascal |
| RDOS | Physical | Pascal | - | - |
- 13-sector disks are only track/sector devices. (And RDOS has a unique mapping to 256 byte blocks).
- 16-sector disks have a variety of sector mappings. It can also double as a "standard" 512 byte block, as well as a unique CP/M 1024 block device.
- 800K disks are only standard 512 byte block (Prodos or Pascal). OzDOS and UniDOS do have unique mappings to track and sector, but logically, they are block devices.
- Anything else (larger than 800K) are "hard-disk" images and only blocks.
Note that much of this logic is deferred to the "old" AppleCommander APIs for the time being.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classstatic enumstatic final record -
Method Summary
Modifier and TypeMethodDescriptiondefault FileStorecreate(FileStoreOrganization fileStoreOrganization, Map<String, ConfigurationOption> options) Create aFileStoreusing the given configuration settings.default Map<String, ConfigurationOption> The configuration options forFileStorecreation.default List<FileStoreOrganization> The supported organizations forFileStorecreation.getName()The name of this factory.voidInspect the givenSource, storing any results or messages in the context.
-
Method Details
-
getName
String getName()The name of this factory. Usually the name and file extensions. -
inspect
Inspect the givenSource, storing any results or messages in the context. -
getFileStoreOrganizations
The supported organizations forFileStorecreation. Note that this isn't particularly useful for archives, so there is a generic "archive" organization. For disk images, this will typically orient around the physical device including sector ordering, if applicable. -
getConfigurationOptions
The configuration options forFileStorecreation. The key of the map is the id and is intended to be utilized in the CLI environment to locate and update a field. -
create
default FileStore create(FileStoreOrganization fileStoreOrganization, Map<String, ConfigurationOption> options) Create aFileStoreusing the given configuration settings.- See Also:
-