PsiFS: *Commands

*PsiFSMap

*PsiFSMap
Specifies a mapping between a SIBO file extension or EPOC UID and a RISC OS file type

Syntax:*PsiFSMap [-ext extension | -uid uid | -other] [[-type] filetype] [-mimemap | -nomimemap]

Parameters:-ext extension a SIBO file extension of up to three characters
-uid uid an EPOC UID (24 digit hexadecimal number)
-other used to specify file type for all unrecognised or unmapped files
filetype a number (in hexadecimal by default) or text description of the file type to be mapped. The command *Show File$Type* displays a list of valid file types.
-mimemap enables use of the MimeMap module
-nomimemap disables use of the MimeMap module

Use: *PsiFSMap specifies a mapping between either a SIBO extension or EPOC UID and a RISC OS file type. Any SIBO or EPOC file with either the given extension or UID will be treated by RISC OS as having the given file type, rather than being of type Psion. Mappings based on a UID take priority over those based on an extension.

The MimeMap module, if available, may also be used to convert extensions to file types. This is only tried if there is no match for the internal UID or extension mappings.

If no RISC OS filetype is given, then the existing mapping (if any) for that extension or UID is cancelled. If no parameter is given, then all current mappings are listed.

The UID is constructed from the first 3 words of the file represented in hexadecimal (padded with leading zeros to 8 digits if necessary) concatenated to form a single 24 digit value. For example, for an EPOC Sheet file:
First 12 bytes370000106D00001088000010
First 3 words100000371000006D10000088
UID100000371000006D10000088

The mappings are only retained until the next reset. More permanent changes can be made by modifying the !PsiFS.Configure file that specifies the default mappings used by PsiFS.


Example:PsiFSMap -ext SHT -type PsiSheet
PsiFSMap -ext SPR -type PsiSheet
PsiFSMap -uid 100000371000006D10000088 -type PsiSheet
Treat all files with an SHR or SPR extension or the specified UID as PsiSheet files. It is not necessary for all of the extensions or UIDs to match; any single match will set the file type.
PsiFSMap -other -type PsionTreat all files that have no other mapping defined as Psion files.
PsiFSMap -uid 000000000000000000000000 -type DataTreat all files without an EPOC UID as Data files. This disables mapping by extension for EPOC files. Exactly 24 zeros must be specified.
PsiFSMap -ext "" -type TextTreat all files without a SIBO extension as RISC OS Text files. For example, they will have Text file icons, and load into a text editor when double-clicked on.

Related commands:*DOSMap

[Contents] [Up] Copyright © Alexander Thoukydides, 1998, 1999, 2000