For version 0.1.2
last update: Sun Dec 16 2007
http://www.fixedpoint.jp/gauche-magic/
An object of the class wraps a C's magic_t.
A libmagic-origin error will be raised as a instance of the class.
It has two slots: "no" and "message". The former indicates a magic-specific errno.
These are integers corresponding to their C-alternatives and mutually exclusive on logical-and.
A flag argument of magic-open may be a logical-or of these.
Return a <magic-set> with given `flags', or #f if an error occurs.
Close the <magic-set> `ms'. It is preferable but optional since gc works in the long run.
Load a magic database at `path'.
Check or compile a magic database at `path'.
Given `ms' must have flags with MAGIC_CHECK on, an error if not.
Return the description of the file `path' as a string, or #f if an error occurs.
Return the path of the default database file, e.g. /usr/share/file/magic.
Call `proc' with a <magic-set> whose flags are `flags' as a single argument.
If `flags' with MAGIC_CHECK off (default), before doing that it loads a magic wisdom which is either the `db' or a default one unless specified.
Returning with an error or without, it closes the <magic-set>.