| Copyright | Copyright (C) 2005 John Goerzen |
|---|---|
| License | BSD |
| Maintainer | Joey Hess, |
| Stability | provisional |
| Portability | portable |
| Safe Haskell | None |
| Language | Haskell2010 |
Magic.Operations
Description
Operations for magic programs
Written by John Goerzen, jgoerzen@complete.org
Synopsis
- magicFile :: Magic -> OsPath -> IO ByteString
- magicStdin :: Magic -> IO ByteString
- magicFD :: Magic -> FD -> IO ByteString
- magicString :: Magic -> String -> IO ByteString
- magicCString :: Magic -> CStringLen -> IO ByteString
- magicSetFlags :: Magic -> [MagicFlag] -> IO ()
Guessing the type
magicStdin :: Magic -> IO ByteString Source #
Calls the Magic system on stdin.
magicFD :: Magic -> FD -> IO ByteString Source #
Calls the Magic system on the contents of the file descriptor.
magicString :: Magic -> String -> IO ByteString Source #
Calls the Magic system to process the given String. Please note: it is not evaluated lazily.
magicCString :: Magic -> CStringLen -> IO ByteString 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.