magic-1.0.5: Interface to C file/magic libraryContentsIndex
Magic.Operations
MaintainerJohn Goerzen,
Contents
Guessing the type
Other operations
Description

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

Initialization and shutdown for magic programs

Written by John Goerzen, jgoerzen@complete.org

Synopsis
magicFile :: Magic -> FilePath -> IO String
magicStdin :: Magic -> IO String
magicString :: Magic -> String -> IO String
magicCString :: Magic -> CStringLen -> IO String
magicSetFlags :: Magic -> [MagicFlag] -> IO ()
magicCompile :: Magic -> Maybe String -> IO ()
Guessing the type
magicFile :: Magic -> FilePath -> IO String
Calls the Magic system on the specified file.
magicStdin :: Magic -> IO String
Calls the Magic system on stdin.
magicString :: Magic -> String -> IO String
Calls the Magic system to process the given String. Please note: it is not evaluated lazily.
magicCString :: Magic -> CStringLen -> IO String
Lower-level function used to call the Magic system to process a C string.
Other operations
magicSetFlags :: Magic -> [MagicFlag] -> IO ()
Change the flags on an already-created object.
magicCompile
:: MagicObject to use
-> Maybe StringColon 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.
Produced by Haddock version 0.8