| 1 | \section{\module{binhex} ---
|
|---|
| 2 | Encode and decode binhex4 files}
|
|---|
| 3 |
|
|---|
| 4 | \declaremodule{standard}{binhex}
|
|---|
| 5 | \modulesynopsis{Encode and decode files in binhex4 format.}
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 | This module encodes and decodes files in binhex4 format, a format
|
|---|
| 9 | allowing representation of Macintosh files in \ASCII. On the Macintosh,
|
|---|
| 10 | both forks of a file and the finder information are encoded (or
|
|---|
| 11 | decoded), on other platforms only the data fork is handled.
|
|---|
| 12 |
|
|---|
| 13 | The \module{binhex} module defines the following functions:
|
|---|
| 14 |
|
|---|
| 15 | \begin{funcdesc}{binhex}{input, output}
|
|---|
| 16 | Convert a binary file with filename \var{input} to binhex file
|
|---|
| 17 | \var{output}. The \var{output} parameter can either be a filename or a
|
|---|
| 18 | file-like object (any object supporting a \method{write()} and
|
|---|
| 19 | \method{close()} method).
|
|---|
| 20 | \end{funcdesc}
|
|---|
| 21 |
|
|---|
| 22 | \begin{funcdesc}{hexbin}{input\optional{, output}}
|
|---|
| 23 | Decode a binhex file \var{input}. \var{input} may be a filename or a
|
|---|
| 24 | file-like object supporting \method{read()} and \method{close()} methods.
|
|---|
| 25 | The resulting file is written to a file named \var{output}, unless the
|
|---|
| 26 | argument is omitted in which case the output filename is read from the
|
|---|
| 27 | binhex file.
|
|---|
| 28 | \end{funcdesc}
|
|---|
| 29 |
|
|---|
| 30 | The following exception is also defined:
|
|---|
| 31 |
|
|---|
| 32 | \begin{excdesc}{Error}
|
|---|
| 33 | Exception raised when something can't be encoded using the binhex
|
|---|
|
|---|