The ePub and ODT/ODF formats are examples of archived/compressed formats. These consist of:
a filesystem format (zip);
an uncompressed mimetype file containing the mimetype of the underlying format;
a META-INF folder containing metadata about the document;
the format contents.
Multi-part documents can be grouped together under the same folder name without any formal overarching metadata/organisation (aside from the names being sequentially ordered on the file system).
If path is a directory, it will create a filesystem object that reads files on the system.
If path is a zip file, it will create a filesystem object that reads files in the zip file.
The filesystem logic will then look for a mimetype file. If that file exists, it will use that file as the mimetype to look up the content loader for the appropriate filetype, passing that parser the filesystem object. These will then be the ePub, ODF and other content processors.
If the mimetype file does not exist, the processor will assume a multi-part document is being read and will enumerate all items in that level attempting to parse those documents (ignoring any failures). Each item will be reported as a TOC entry.
The ePub and ODT/ODF formats are examples of archived/compressed formats. These consist of:
Multi-part documents can be grouped together under the same folder name without any formal overarching metadata/organisation (aside from the names being sequentially ordered on the file system).
The API will look something like this:
If path is a directory, it will create a filesystem object that reads files on the system.
If path is a zip file, it will create a filesystem object that reads files in the zip file.
The filesystem logic will then look for a mimetype file. If that file exists, it will use that file as the mimetype to look up the content loader for the appropriate filetype, passing that parser the filesystem object. These will then be the ePub, ODF and other content processors.
If the mimetype file does not exist, the processor will assume a multi-part document is being read and will enumerate all items in that level attempting to parse those documents (ignoring any failures). Each item will be reported as a TOC entry.