The magicffi Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The magicffi Reference Manual

This is the magicffi Reference Manual, generated automatically by Declt version 3.0 "Montgomery Scott" on Wed Nov 04 14:24:39 2020 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

MAGICFFI Build Status

MAGICFFI is a CFFI interface to libmagic(3), the file type determination library using ``magic'' numbers.

Download

To check out the git repository, run:

$ git clone git://github.com/guicho271828/magicffi.git

Installation

MAGICFFI depends on the following lisp libraries:

The following system packages are also required:

You have to install them on your system before loading magicffi.

Tutorial

> (asdf:load-system :magicffi)
> (use-package :magicffi)
> (with-open-magic (magic '(:mime-type :symlink))
    (magic-file magic #P"magicffi.asd"))
"text/plain"

Documentation

All external symbols of the package MAGICFFI are listed in package.lisp. Check out their docstrings for help.

Magic Flags

You can use either constants or keyword list as magic flags. I.e.,

(magic-open (logxor +magic-mime-type+ +magic-symlink+))

is equivalent to

(magic-open '(:mime-type :symlink))

The constant name and keyword name of a flag are based on its C name. See the following table for the pattern:

| C name | Lisp constant | Lisp keyword | |--------------|----------------|--------------| | MAGIC_NONE | +MAGIC-NONE+ | :NONE |

All constant names are exported.

Credit


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 magicffi

Maintainer

Desmond O. Chang <dochang+magicffi@gmail.com>

Author

Desmond O. Chang <dochang+magicffi@gmail.com>

License

Simplified BSD License

Description

cffi interface to libmagic(3)

Long Description

A file type determination library.

Defsystem Dependency

cffi-grovel

Dependencies
Source

magicffi.asd (file)

Components

Next: , Previous: , Up: Top   [Contents][Index]

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.1 magicffi.asd

Location

/home/quickref/quicklisp/dists/quicklisp/software/magicffi-20200925-git/magicffi.asd

Systems

magicffi (system)


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.2 magicffi/package.lisp

Parent

magicffi (system)

Location

package.lisp

Packages

magicffi


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.3 magicffi/grovel.lisp

Dependency

package.lisp (file)

Parent

magicffi (system)

Location

grovel.lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.4 magicffi/types.lisp

Dependency

grovel.lisp (file)

Parent

magicffi (system)

Location

types.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.5 magicffi/api.lisp

Dependency

types.lisp (file)

Parent

magicffi (system)

Location

api.lisp

Exported Definitions
Internal Definitions

Previous: , Up: Lisp files   [Contents][Index]

3.1.6 magicffi/shortcuts.lisp

Dependency

api.lisp (file)

Parent

magicffi (system)

Location

shortcuts.lisp

Exported Definitions

Next: , Previous: , Up: Top   [Contents][Index]

4 Packages

Packages are listed by definition order.


Previous: , Up: Packages   [Contents][Index]

4.1 magicffi

Usage:
> (asdf:load-system :magicffi)
> (use-package :magicffi)
> (with-open-magic (magic ’(:mime-type :symlink)) (magic-load magic)
(magic-file magic #P"magicffi.asd")) "text/plain"

Source

package.lisp (file)

Use List
Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.1 Constants

Constant: +magic-apple+

Return the Apple creator/type

Package

magicffi

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/magicffi-20200925-git/src/grovel.processed-grovel-file

Constant: +magic-check+

Print warnings to stderr

Package

magicffi

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/magicffi-20200925-git/src/grovel.processed-grovel-file

Constant: +magic-compress+

Check inside compressed files

Package

magicffi

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/magicffi-20200925-git/src/grovel.processed-grovel-file

Constant: +magic-continue+

Return all matches

Package

magicffi

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/magicffi-20200925-git/src/grovel.processed-grovel-file

Constant: +magic-debug+

Turn on debugging

Package

magicffi

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/magicffi-20200925-git/src/grovel.processed-grovel-file

Constant: +magic-devices+

Look at the contents of devices

Package

magicffi

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/magicffi-20200925-git/src/grovel.processed-grovel-file

Constant: +magic-error+

Handle ENOENT etc as real errors

Package

magicffi

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/magicffi-20200925-git/src/grovel.processed-grovel-file

Constant: +magic-mime+

A shorthand for MAGIC_MIME_TYPE | MAGIC_MIME_ENCODING

Package

magicffi

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/magicffi-20200925-git/src/grovel.processed-grovel-file

Constant: +magic-mime-encoding+

Return the MIME encoding

Package

magicffi

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/magicffi-20200925-git/src/grovel.processed-grovel-file

Constant: +magic-mime-type+

Return the MIME type

Package

magicffi

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/magicffi-20200925-git/src/grovel.processed-grovel-file

Constant: +magic-no-check-apptype+

Don’t check application type

Package

magicffi

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/magicffi-20200925-git/src/grovel.processed-grovel-file

Constant: +magic-no-check-ascii+

Defined for backwards compatibility (renamed): same as MAGIC_NO_CHECK_TEXT

Package

magicffi

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/magicffi-20200925-git/src/grovel.processed-grovel-file

Constant: +magic-no-check-cdf+

Don’t check for cdf files

Package

magicffi

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/magicffi-20200925-git/src/grovel.processed-grovel-file

Constant: +magic-no-check-compress+

Don’t check for compressed files

Package

magicffi

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/magicffi-20200925-git/src/grovel.processed-grovel-file

Constant: +magic-no-check-elf+

Don’t check for elf details

Package

magicffi

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/magicffi-20200925-git/src/grovel.processed-grovel-file

Constant: +magic-no-check-encoding+

Don’t check text encodings

Package

magicffi

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/magicffi-20200925-git/src/grovel.processed-grovel-file

Constant: +magic-no-check-fortran+

Defined for backwards compatibility; do nothing

Package

magicffi

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/magicffi-20200925-git/src/grovel.processed-grovel-file

Constant: +magic-no-check-soft+

Don’t check magic entries

Package

magicffi

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/magicffi-20200925-git/src/grovel.processed-grovel-file

Constant: +magic-no-check-tar+

Don’t check for tar files

Package

magicffi

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/magicffi-20200925-git/src/grovel.processed-grovel-file

Constant: +magic-no-check-text+

Don’t check for text files

Package

magicffi

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/magicffi-20200925-git/src/grovel.processed-grovel-file

Constant: +magic-no-check-tokens+

Don’t check tokens

Package

magicffi

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/magicffi-20200925-git/src/grovel.processed-grovel-file

Constant: +magic-no-check-troff+

Defined for backwards compatibility; do nothing

Package

magicffi

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/magicffi-20200925-git/src/grovel.processed-grovel-file

Constant: +magic-none+

No flags

Package

magicffi

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/magicffi-20200925-git/src/grovel.processed-grovel-file

Constant: +magic-preserve-atime+

Restore access time on exit

Package

magicffi

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/magicffi-20200925-git/src/grovel.processed-grovel-file

Constant: +magic-raw+

Don’t convert unprintable chars

Package

magicffi

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/magicffi-20200925-git/src/grovel.processed-grovel-file

Follow symlinks

Package

magicffi

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/magicffi-20200925-git/src/grovel.processed-grovel-file


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.2 Special variables

Special Variable: *magic-database*

Default magic database files. It can be NIL(default), or a designator for a non-empty list of pathname designators. NIL means the default database files defined by libmagic.

Package

magicffi

Source

api.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.3 Macros

Macro: with-open-magic (MAGIC &optional FLAGS MAGICFILES) &body BODY

Opens the magic cookie MAGIC, executes BODY and close MAGIC.

FLAGS:
A list of keywords (see types), defaulted to (:none).

MAGICFILES:
NIL, or a list of pathname designators for the database files.
Defaulted to NIL, which uses the default database available in the system. This covers the most usage.

Package

magicffi

Source

api.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.4 Functions

Function: magic-buffer MAGIC STRING

Returns a textual description of the contents of the STRING argument. An error of type MAGIC-ERROR is signaled on failure.

Package

magicffi

Source

api.lisp (file)

Function: magic-check MAGIC &optional PATHNAME-LIST

Checks the validity of database files. PATHNAME-LIST is NIL(default), which means use *MAGIC-DATABASE*, or a designator for a non-empty list of pathname designators. Returns ’true’ on success and signals an error of type MAGIC-ERROR on failure.

Package

magicffi

Source

api.lisp (file)

Function: magic-close MAGIC

Closes the magic database and deallocates any resources used. It is permissible to close an already closed magic, and has no effect. Returns ’true’ if an open magic cookie has been closed, or ’false’ if the magic cookie is already closed.

Package

magicffi

Source

api.lisp (file)

Function: magic-compile MAGIC &optional PATHNAME-LIST

Compiles database files. PATHNAME-LIST is NIL(default), which means use *MAGIC-DATABASE*, or a designator for a non-empty list of pathname designators. Returns ’true’ on success and signals an error of type MAGIC-ERROR on failure. The compiled files created are named from the basename(1) of each file argument with ‘.mgc’ appended to it.

Package

magicffi

Source

api.lisp (file)

Function: magic-error MAGIC

Signals an error of type MAGIC-ERROR.

Package

magicffi

Source

api.lisp (file)

Function: magic-file MAGIC PATHSPEC

Returns a textual description of the contents of the PATHSPEC argument. PATHSPEC is a pathname designator. An error of type MAGIC-ERROR is signaled on failure.

Package

magicffi

Source

api.lisp (file)

Function: magic-load MAGIC &optional PATHNAME-LIST

Loads database files. PATHNAME-LIST is NIL(default), which means use *MAGIC-DATABASE*, or a designator for a non-empty list of pathname designators. Returns ’true’ on success and signals an error of type MAGIC-ERROR on failure.

Package

magicffi

Source

api.lisp (file)

Function: magic-open FLAGS

Creates a magic cookie and returns it. An error of type SIMPLE-ERROR is signaled on failure. FLAGS specifies how the other magic functions should behave. See README for the flags usage.

Package

magicffi

Source

api.lisp (file)

Function: magic-setflags MAGIC FLAGS

Sets the magic flags. Signals an error of type SIMPLE-ERROR on systems that don’t support utime(2), or utimes(2) when :PRESERVE-ATIME is set; otherwise, returns ’true’.

Package

magicffi

Source

api.lisp (file)

Function: magicp OBJECT

Returns ’true’ if object is of type MAGIC; otherwise, returns ’false’. It is unaffected by whether object, if it is a magic, is open or closed.

Package

magicffi

Source

types.lisp (file)

Function: open-magic-p MAGIC

Returns ’true’ if MAGIC is open; otherwise, returns ’false’.

Package

magicffi

Source

types.lisp (file)

Function: pathname-apple FILE &rest FLAGS &key DEBUG SYMLINK COMPRESS DEVICES CONTINUE CHECK PRESERVE-ATIME RAW ERROR COMPRESS-TRANSP NO-CHECK-COMPRESS NO-CHECK-TAR NO-CHECK-SOFT NO-CHECK-APPTYPE NO-CHECK-ELF NO-CHECK-TEXT NO-CHECK-CDF NO-CHECK-TOKENS NO-CHECK-ENCODING

Return the Apple creator/type

Package

magicffi

Source

shortcuts.lisp (file)

Function: pathname-extension FILE &rest FLAGS &key DEBUG SYMLINK COMPRESS DEVICES CONTINUE CHECK PRESERVE-ATIME RAW ERROR COMPRESS-TRANSP NO-CHECK-COMPRESS NO-CHECK-TAR NO-CHECK-SOFT NO-CHECK-APPTYPE NO-CHECK-ELF NO-CHECK-TEXT NO-CHECK-CDF NO-CHECK-TOKENS NO-CHECK-ENCODING

Return a /-separated list of extensions. This is NOT about the file name extensions (such as .png).

Package

magicffi

Source

shortcuts.lisp (file)

Function: pathname-file FILE &rest FLAGS &key DEBUG SYMLINK COMPRESS DEVICES CONTINUE CHECK PRESERVE-ATIME RAW ERROR COMPRESS-TRANSP NO-CHECK-COMPRESS NO-CHECK-TAR NO-CHECK-SOFT NO-CHECK-APPTYPE NO-CHECK-ELF NO-CHECK-TEXT NO-CHECK-CDF NO-CHECK-TOKENS NO-CHECK-ENCODING

Returns a description, as in unix ‘file‘ command

Package

magicffi

Source

shortcuts.lisp (file)

Function: pathname-mime FILE &rest FLAGS &key DEBUG SYMLINK COMPRESS DEVICES CONTINUE CHECK PRESERVE-ATIME RAW ERROR COMPRESS-TRANSP NO-CHECK-COMPRESS NO-CHECK-TAR NO-CHECK-SOFT NO-CHECK-APPTYPE NO-CHECK-ELF NO-CHECK-TEXT NO-CHECK-CDF NO-CHECK-TOKENS NO-CHECK-ENCODING

Return the MIME type

Package

magicffi

Source

shortcuts.lisp (file)

Function: pathname-mime-encoding FILE &rest FLAGS &key DEBUG SYMLINK COMPRESS DEVICES CONTINUE CHECK PRESERVE-ATIME RAW ERROR COMPRESS-TRANSP NO-CHECK-COMPRESS NO-CHECK-TAR NO-CHECK-SOFT NO-CHECK-APPTYPE NO-CHECK-ELF NO-CHECK-TEXT NO-CHECK-CDF NO-CHECK-TOKENS NO-CHECK-ENCODING

Return the MIME encoding

Package

magicffi

Source

shortcuts.lisp (file)

Function: pathname-mime-type FILE &rest FLAGS &key DEBUG SYMLINK COMPRESS DEVICES CONTINUE CHECK PRESERVE-ATIME RAW ERROR COMPRESS-TRANSP NO-CHECK-COMPRESS NO-CHECK-TAR NO-CHECK-SOFT NO-CHECK-APPTYPE NO-CHECK-ELF NO-CHECK-TEXT NO-CHECK-CDF NO-CHECK-TOKENS NO-CHECK-ENCODING

Return the MIME type

Package

magicffi

Source

shortcuts.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.5 Generic functions

Generic Function: magic-error-errno CONDITION
Package

magicffi

Methods
Method: magic-error-errno (CONDITION magic-error)
Source

types.lisp (file)

Generic Function: magic-error-error CONDITION
Package

magicffi

Methods
Method: magic-error-error (CONDITION magic-error)
Source

types.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.6 Conditions

Condition: magic-error ()

Consists of errors that are related to MAGICFFI.
Use the function MAGIC-ERROR to signal it. The error number and error string are accessed by the functions MAGIC-ERROR-ERRNO and MAGIC-ERROR-ERROR.

Package

magicffi

Source

types.lisp (file)

Direct superclasses

error (condition)

Direct methods
Direct slots
Slot: %errno
Initargs

:errno

Readers

magic-error-errno (generic function)

Slot: %error
Initargs

:error

Readers

magic-error-error (generic function)


Previous: , Up: Exported definitions   [Contents][Index]

5.1.7 Classes

Class: magic ()

Lisp magic class.

Package

magicffi

Source

types.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
Direct slots
Initargs

:cookie

Readers

%magic-cookie (generic function)

Writers

(setf %magic-cookie) (generic function)


Previous: , Up: Definitions   [Contents][Index]

5.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.1 Constants

Constant: +magic-compress-transp+

Check inside compressed files but not report compression

Package

magicffi

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/magicffi-20200925-git/src/grovel.processed-grovel-file

Constant: +magic-extension+

Return a /-separated list of extensions

Package

magicffi

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/magicffi-20200925-git/src/grovel.processed-grovel-file

Constant: +magic-no-check-builtin+

A shorthand for:
MAGIC_NO_CHECK_COMPRESS | MAGIC_NO_CHECK_TAR | MAGIC_NO_CHECK_APPTYPE | MAGIC_NO_CHECK_ELF | MAGIC_NO_CHECK_TEXT | MAGIC_NO_CHECK_CDF | MAGIC_NO_CHECK_TOKENS | MAGIC_NO_CHECK_ENCODING.
Not documented in the library documentation.

Package

magicffi

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/magicffi-20200925-git/src/grovel.processed-grovel-file

Constant: +magic-param-bytes-max+
Package

magicffi

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/magicffi-20200925-git/src/grovel.processed-grovel-file

Constant: +magic-param-elf-notes-max+
Package

magicffi

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/magicffi-20200925-git/src/grovel.processed-grovel-file

Constant: +magic-param-elf-phnum-max+
Package

magicffi

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/magicffi-20200925-git/src/grovel.processed-grovel-file

Constant: +magic-param-elf-shnum-max+
Package

magicffi

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/magicffi-20200925-git/src/grovel.processed-grovel-file

Constant: +magic-param-indir-max+
Package

magicffi

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/magicffi-20200925-git/src/grovel.processed-grovel-file

Constant: +magic-param-name-max+
Package

magicffi

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/magicffi-20200925-git/src/grovel.processed-grovel-file

Constant: +magic-param-regex-max+
Package

magicffi

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/magicffi-20200925-git/src/grovel.processed-grovel-file

Constant: +magic-version+

This implementation

Package

magicffi

Source

/home/quickref/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/quickref/quicklisp/dists/quicklisp/software/magicffi-20200925-git/src/grovel.processed-grovel-file


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.2 Symbol macros

Symbol Macro: *errno*
Package

magicffi

Source

api.lisp (file)

Expansion

(magicffi::%var-accessor-*errno*)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.3 Macros

Macro: %database-funcall NAME-AND-OPTIONS MAGIC PATHNAME-LIST
Package

magicffi

Source

api.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.4 Functions

Function: %boolean-from-lisp VALUE
Package

magicffi

Source

types.lisp (file)

Function: %boolean-to-lisp VALUE
Package

magicffi

Source

types.lisp (file)

Function: %magic-c-to-lisp COOKIE
Package

magicffi

Source

types.lisp (file)

Function: %magic-error-reporter CONDITION STREAM
Package

magicffi

Source

types.lisp (file)

Function: %magic-lisp-to-c MAGIC
Package

magicffi

Source

types.lisp (file)

Function: %pathlist-to-cstring PATHNAME-LIST
Package

magicffi

Source

api.lisp (file)

Function: %pathname-concat SEQ
Package

magicffi

Source

api.lisp (file)

Function: %truename FILESPEC
Package

magicffi

Source

api.lisp (file)

Function: %var-accessor-*errno* ()
Function: (setf %var-accessor-*errno*) VALUE
Package

magicffi

Source

api.lisp (file)

Function: magic-verify-version ()
Package

magicffi

Source

api.lisp (file)

Function: magic-version ()

The magic_version() command returns the version number of this library which is compiled into the shared library using the constant MAGIC_VERSION from <magic.h>. This can be used by client programs to verify that the version they compile against is the same as the version that they run against.

Package

magicffi

Source

api.lisp (file)


Previous: , Up: Internal definitions   [Contents][Index]

5.2.5 Generic functions

Generic Function: %magic-cookie OBJECT
Generic Function: (setf %magic-cookie) NEW-VALUE OBJECT
Package

magicffi

Methods
Method: %magic-cookie (MAGIC magic)

automatically generated reader method

Source

types.lisp (file)

Method: (setf %magic-cookie) NEW-VALUE (MAGIC magic)

automatically generated writer method

Source

types.lisp (file)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   F   L   M  
Index Entry  Section

F
File, Lisp, magicffi.asd: The magicffi․asd file
File, Lisp, magicffi/api.lisp: The magicffi/api․lisp file
File, Lisp, magicffi/grovel.lisp: The magicffi/grovel․lisp file
File, Lisp, magicffi/package.lisp: The magicffi/package․lisp file
File, Lisp, magicffi/shortcuts.lisp: The magicffi/shortcuts․lisp file
File, Lisp, magicffi/types.lisp: The magicffi/types․lisp file

L
Lisp File, magicffi.asd: The magicffi․asd file
Lisp File, magicffi/api.lisp: The magicffi/api․lisp file
Lisp File, magicffi/grovel.lisp: The magicffi/grovel․lisp file
Lisp File, magicffi/package.lisp: The magicffi/package․lisp file
Lisp File, magicffi/shortcuts.lisp: The magicffi/shortcuts․lisp file
Lisp File, magicffi/types.lisp: The magicffi/types․lisp file

M
magicffi.asd: The magicffi․asd file
magicffi/api.lisp: The magicffi/api․lisp file
magicffi/grovel.lisp: The magicffi/grovel․lisp file
magicffi/package.lisp: The magicffi/package․lisp file
magicffi/shortcuts.lisp: The magicffi/shortcuts․lisp file
magicffi/types.lisp: The magicffi/types․lisp file

Jump to:   F   L   M  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   %   (  
F   G   M   O   P   W  
Index Entry  Section

%
%boolean-from-lisp: Internal functions
%boolean-to-lisp: Internal functions
%database-funcall: Internal macros
%magic-c-to-lisp: Internal functions
%magic-cookie: Internal generic functions
%magic-cookie: Internal generic functions
%magic-error-reporter: Internal functions
%magic-lisp-to-c: Internal functions
%pathlist-to-cstring: Internal functions
%pathname-concat: Internal functions
%truename: Internal functions
%var-accessor-*errno*: Internal functions

(
(setf %magic-cookie): Internal generic functions
(setf %magic-cookie): Internal generic functions
(setf %var-accessor-*errno*): Internal functions

F
Function, %boolean-from-lisp: Internal functions
Function, %boolean-to-lisp: Internal functions
Function, %magic-c-to-lisp: Internal functions
Function, %magic-error-reporter: Internal functions
Function, %magic-lisp-to-c: Internal functions
Function, %pathlist-to-cstring: Internal functions
Function, %pathname-concat: Internal functions
Function, %truename: Internal functions
Function, %var-accessor-*errno*: Internal functions
Function, (setf %var-accessor-*errno*): Internal functions
Function, magic-buffer: Exported functions
Function, magic-check: Exported functions
Function, magic-close: Exported functions
Function, magic-compile: Exported functions
Function, magic-error: Exported functions
Function, magic-file: Exported functions
Function, magic-load: Exported functions
Function, magic-open: Exported functions
Function, magic-setflags: Exported functions
Function, magic-verify-version: Internal functions
Function, magic-version: Internal functions
Function, magicp: Exported functions
Function, open-magic-p: Exported functions
Function, pathname-apple: Exported functions
Function, pathname-extension: Exported functions
Function, pathname-file: Exported functions
Function, pathname-mime: Exported functions
Function, pathname-mime-encoding: Exported functions
Function, pathname-mime-type: Exported functions

G
Generic Function, %magic-cookie: Internal generic functions
Generic Function, (setf %magic-cookie): Internal generic functions
Generic Function, magic-error-errno: Exported generic functions
Generic Function, magic-error-error: Exported generic functions

M
Macro, %database-funcall: Internal macros
Macro, with-open-magic: Exported macros
magic-buffer: Exported functions
magic-check: Exported functions
magic-close: Exported functions
magic-compile: Exported functions
magic-error: Exported functions
magic-error-errno: Exported generic functions
magic-error-errno: Exported generic functions
magic-error-error: Exported generic functions
magic-error-error: Exported generic functions
magic-file: Exported functions
magic-load: Exported functions
magic-open: Exported functions
magic-setflags: Exported functions
magic-verify-version: Internal functions
magic-version: Internal functions
magicp: Exported functions
Method, %magic-cookie: Internal generic functions
Method, (setf %magic-cookie): Internal generic functions
Method, magic-error-errno: Exported generic functions
Method, magic-error-error: Exported generic functions

O
open-magic-p: Exported functions

P
pathname-apple: Exported functions
pathname-extension: Exported functions
pathname-file: Exported functions
pathname-mime: Exported functions
pathname-mime-encoding: Exported functions
pathname-mime-type: Exported functions

W
with-open-magic: Exported macros

Jump to:   %   (  
F   G   M   O   P   W  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   %   *   +  
C   S  
Index Entry  Section

%
%errno: Exported conditions
%error: Exported conditions

*
*errno*: Internal symbol macros
*magic-database*: Exported special variables

+
+magic-apple+: Exported constants
+magic-check+: Exported constants
+magic-compress+: Exported constants
+magic-compress-transp+: Internal constants
+magic-continue+: Exported constants
+magic-debug+: Exported constants
+magic-devices+: Exported constants
+magic-error+: Exported constants
+magic-extension+: Internal constants
+magic-mime+: Exported constants
+magic-mime-encoding+: Exported constants
+magic-mime-type+: Exported constants
+magic-no-check-apptype+: Exported constants
+magic-no-check-ascii+: Exported constants
+magic-no-check-builtin+: Internal constants
+magic-no-check-cdf+: Exported constants
+magic-no-check-compress+: Exported constants
+magic-no-check-elf+: Exported constants
+magic-no-check-encoding+: Exported constants
+magic-no-check-fortran+: Exported constants
+magic-no-check-soft+: Exported constants
+magic-no-check-tar+: Exported constants
+magic-no-check-text+: Exported constants
+magic-no-check-tokens+: Exported constants
+magic-no-check-troff+: Exported constants
+magic-none+: Exported constants
+magic-param-bytes-max+: Internal constants
+magic-param-elf-notes-max+: Internal constants
+magic-param-elf-phnum-max+: Internal constants
+magic-param-elf-shnum-max+: Internal constants
+magic-param-indir-max+: Internal constants
+magic-param-name-max+: Internal constants
+magic-param-regex-max+: Internal constants
+magic-preserve-atime+: Exported constants
+magic-raw+: Exported constants
+magic-symlink+: Exported constants
+magic-version+: Internal constants

C
Constant, +magic-apple+: Exported constants
Constant, +magic-check+: Exported constants
Constant, +magic-compress+: Exported constants
Constant, +magic-compress-transp+: Internal constants
Constant, +magic-continue+: Exported constants
Constant, +magic-debug+: Exported constants
Constant, +magic-devices+: Exported constants
Constant, +magic-error+: Exported constants
Constant, +magic-extension+: Internal constants
Constant, +magic-mime+: Exported constants
Constant, +magic-mime-encoding+: Exported constants
Constant, +magic-mime-type+: Exported constants
Constant, +magic-no-check-apptype+: Exported constants
Constant, +magic-no-check-ascii+: Exported constants
Constant, +magic-no-check-builtin+: Internal constants
Constant, +magic-no-check-cdf+: Exported constants
Constant, +magic-no-check-compress+: Exported constants
Constant, +magic-no-check-elf+: Exported constants
Constant, +magic-no-check-encoding+: Exported constants
Constant, +magic-no-check-fortran+: Exported constants
Constant, +magic-no-check-soft+: Exported constants
Constant, +magic-no-check-tar+: Exported constants
Constant, +magic-no-check-text+: Exported constants
Constant, +magic-no-check-tokens+: Exported constants
Constant, +magic-no-check-troff+: Exported constants
Constant, +magic-none+: Exported constants
Constant, +magic-param-bytes-max+: Internal constants
Constant, +magic-param-elf-notes-max+: Internal constants
Constant, +magic-param-elf-phnum-max+: Internal constants
Constant, +magic-param-elf-shnum-max+: Internal constants
Constant, +magic-param-indir-max+: Internal constants
Constant, +magic-param-name-max+: Internal constants
Constant, +magic-param-regex-max+: Internal constants
Constant, +magic-preserve-atime+: Exported constants
Constant, +magic-raw+: Exported constants
Constant, +magic-symlink+: Exported constants
Constant, +magic-version+: Internal constants
cookie: Exported classes

S
Slot, %errno: Exported conditions
Slot, %error: Exported conditions
Slot, cookie: Exported classes
Special Variable, *magic-database*: Exported special variables
Symbol Macro, *errno*: Internal symbol macros

Jump to:   %   *   +  
C   S  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   C   M   P   S  
Index Entry  Section

C
Class, magic: Exported classes
Condition, magic-error: Exported conditions

M
magic: Exported classes
magic-error: Exported conditions
magicffi: The magicffi system
magicffi: The magicffi package

P
Package, magicffi: The magicffi package

S
System, magicffi: The magicffi system

Jump to:   C   M   P   S