Next: Container URLs, Previous: IMAP URLs, Up: URLs
There is one other URL type supported by IMAIL: file URLs. This uses the `file:' URL syntax,1 as follows:
file://hostname/pathname
Here hostname refers to the host on which the file (folder) resides. Since IMAIL supports only files on the local file system, hostname must be `localhost'; it may also be omitted, as in
file:///pathname
IMAIL also supports a non-standard abbreviation:
file:/pathname
As specified by the URL standard, pathname is a slash-separated sequence of path components, where unusual characters appearing in the components, such as the space character, are specially encoded. However, IMAIL will accept nearly any character in a component, and encode it if required; with few exceptions you can type any pathname without encoding. IMAIL always displays URLs with proper encoding.
In practice, this means that most unix filenames are written verbatim, with exceptions for special characters, and with the leading slash omitted. However, DOS-style filenames, as used by Windows and OS/2, must be specially rewritten to conform to this style.
The rewriting rules for DOS file URLs are not specified by the standard, so consequently IMAIL defines its own rules for this encoding, as follows. A DOS filename is encoded by replacing all of the backslash characters with forward-slash characters, and by encoding unusual characters in the path components. Finally, the drive letter is prefixed to the path with an additional forward-slash separator. So for, example, the filename
C:\My Documents\Mail\My Mail.rmail
becomes the URL
file://localhost/C:/My%20Documents/Mail/My%20Mail.rmail