magic-1.1: Interface to C file/magic library

CopyrightCopyright (C) 2005 John Goerzen
LicenseBSD
MaintainerJohn Goerzen,
Safe HaskellSafe
LanguageHaskell98

Magic.Operations

Contents

Description

Maintainer : jgoerzen@complete.org Stability : provisional Portability: portable

Initialization and shutdown for magic programs

Written by John Goerzen, jgoerzen@complete.org

Synopsis

Guessing the type

magicFile :: Magic -> FilePath -> IO String Source #

Calls the Magic system on the specified file.

magicStdin :: Magic -> IO String Source #

Calls the Magic system on stdin.

magicString :: Magic -> String -> IO String Source #

Calls the Magic system to process the given String. Please note: it is not evaluated lazily.

magicCString :: Magic -> CStringLen -> IO String Source #

Lower-level function used to call the Magic system to process a C string.

Other operations

magicSetFlags :: Magic -> [MagicFlag] -> IO () Source #

Change the flags on an already-created object.

magicCompile Source #

Arguments

:: Magic

Object to use

-> Maybe String

Colon separated list of databases, or Nothing for default

-> IO () 

Compile the colon-separated list of database file(s). The compiled files created have .mgc added to the names of the argument.