| |
|
MIMEMap
MimeMap and DOSMap
Traditionally many applications have used the DOSMap settings to determine the
RISC OS filetype corresponding to a PC file extension. This is now deprecated
and applications should be converted to use the MimeMap module instead.
DOSMap is still available in DOSFS and may be used to override the setting
given in the MimeMap file, but it is only for DOSFS to use. DOSFS now
behaves as follows:
- Look for filetype information in the reserved fields in the directory structure.
If Acorn filetype is found, then use that (i.e. if DOS disc was written
using an Acorn system).
- Look up file extension in DOSMap settings and map to Acorn filetype if one is defined.
- Look up file extension in MimeMap and map to Acorn filetype if one is defined.
- Nothing available so use type DOS.
The MimeMap module provides a MimeMap_Translate SWI to convert between RISC OS
filetypes, MIME content type and file type suffix:
|
|
MimeMap_Translate (&50B00)
| On entry: | | R0 = input format (see below)
| | | | R1 = filetype (if R0=0), or pointer to string buffer (if R0>0)
| | | | R2 = output format (see below)
| | |
| R3 = output buffer, if needed (i.e. if R2 = 1, 2
or 3) | | On exit: | | R0-R2 preserved
| | | | R3 = result (if R2=0), or pointer to buffer (if R2>0)
| |
| | This SWI may be used to convert between RISC OS file types,
MIME content types and 'dot' extensions to file names. An error will be
returned if the translation cannot be performed. Strings are always
null-terminated.
| |
| | The MimeMap translation formats are:
| |
| | Format | | Name | | Meaning
| | 0 | | MMM_TYPE_RISCOS | | Filetype as a number
| | 1 | | MMM_TYPE_RISCOS_STRING | | Filetype as string
| | 2 | | MMM_TYPE_MIME | | Content type as string
| | 3 | | MMM_TYPE_DOT_EXTN | | Extension as string
| | others | | | | reserved
| | | | |
|
 |
| © 2006 IYONIX Ltd |
32-bit RISC OS |
|