Struct magic::Cookie [] [src]

pub struct Cookie { /* fields omitted */ }

Configuration of which CookieFlags and magic databases to use

Methods

impl Cookie
[src]

Returns a textual description of the contents of the filename

Returns a textual description of the contents of the buffer

Returns a textual explanation of the last error, if any

You should not need to call this, since you can use the MagicError in the Result returned by the other functions.

Sets the flags to use

Overwrites any previously set flags, e.g. those from load().

Check the validity of entries in the database filenames

Compiles the given database filenames for faster access

The compiled files created are named from the basename of each file argument with '.mgc' appended to it.

Dumps all magic entries in the given database filenames in a human readable format

Loads the given database filenames for further queries

Adds '.mgc' to the database filenames as appropriate.

Creates a new configuration, flags specify how other functions should behave

This does not load() any databases yet.

Trait Implementations

impl Drop for Cookie
[src]

Closes the magic database and deallocates any resources used