| Copyright | Copyright (C) 2005 John Goerzen |
|---|---|
| License | BSD-3-Clause |
| Maintainer | Philippe <philippedev101\@gmail.com> |
| Stability | provisional |
| Portability | portable |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Magic.Data
Description
The MagicFlag enumeration, mapping the C libmagic MAGIC_* constants
to Haskell.
Synopsis
- data MagicFlag
- = MagicNone
- | MagicDebug
- | MagicSymlink
- | MagicCompress
- | MagicDevices
- | MagicMimeType
- | MagicMimeEncoding
- | MagicMime
- | MagicContinue
- | MagicCheck
- | MagicPreserveAtime
- | MagicRaw
- | MagicError
- | MagicApple
- | MagicExtension
- | MagicCompressTransp
- | MagicNoCompressFork
- | MagicNodesc
- | MagicNoCheckCompress
- | MagicNoCheckTar
- | MagicNoCheckSoft
- | MagicNoCheckApptype
- | MagicNoCheckElf
- | MagicNoCheckText
- | MagicNoCheckCdf
- | MagicNoCheckCsv
- | MagicNoCheckTokens
- | MagicNoCheckEncoding
- | MagicNoCheckJson
- | MagicNoCheckSimh
- | MagicNoCheckBuiltin
- | UnknownMagicFlag Int
Documentation
Flags that control how libmagic examines a file and what it
reports. Combine them in the list passed to magicOpen or
magicSetFlags.
Constructors
| MagicNone | No special handling; return a textual description (the default). |
| MagicDebug | Print debugging messages to stderr. |
| MagicSymlink | Follow symbolic links. |
| MagicCompress | Look inside compressed files. |
| MagicDevices | Look at the contents of block or character special devices. |
| MagicMimeType | Return a MIME type string instead of a textual description. |
| MagicMimeEncoding | Return the MIME encoding (character set) instead of a textual description. |
| MagicMime | Return both the MIME type and the encoding. |
| MagicContinue | Return all matches, not just the first. |
| MagicCheck | Check the magic database for consistency and report problems. |
| MagicPreserveAtime | Preserve the access time of examined files. |
| MagicRaw | Do not translate unprintable characters to octal escapes. |
| MagicError | Treat errors while examining a file as real errors instead of embedding them in the result. |
| MagicApple | Return the Apple creator and type. |
| MagicExtension | Return a slash-separated list of valid file extensions for the detected type. |
| MagicCompressTransp | Report on the compressed contents only, without mentioning the compression itself (transparent decompression). |
| MagicNoCompressFork | Do not allow decompression that requires forking a helper process. |
| MagicNodesc | Composite of |
| MagicNoCheckCompress | Do not look inside compressed files. |
| MagicNoCheckTar | Do not examine tar archives. |
| MagicNoCheckSoft | Do not consult the magic database entries (soft magic). |
| MagicNoCheckApptype | Do not check for an application type (e.g. EMX). |
| MagicNoCheckElf | Do not examine ELF details. |
| MagicNoCheckText | Do not examine text files. |
| MagicNoCheckCdf | Do not examine CDF (Microsoft Compound Document) files. |
| MagicNoCheckCsv | Do not examine CSV files. |
| MagicNoCheckTokens | Do not look for known text tokens. |
| MagicNoCheckEncoding | Do not check text encodings. |
| MagicNoCheckJson | Do not examine JSON files. |
| MagicNoCheckSimh | Do not examine SIMH tape files. |
| MagicNoCheckBuiltin | Disable all built-in tests; consult only the magic database. |
| UnknownMagicFlag Int | A flag value returned by libmagic that these bindings do not recognise, carrying its raw integer value. |
Instances
| Enum MagicFlag Source # | |
| Show MagicFlag Source # | |
| Eq MagicFlag Source # | |
| Ord MagicFlag Source # | |
Defined in Magic.Data | |