forked from pwaller/magic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
const.go
36 lines (32 loc) · 1.64 KB
/
const.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// This file is subject to a 1-clause BSD license.
// Its contents can be found in the enclosed LICENSE file.
package magic
// No flags
const (
FlagNone = 0x000000
FlagDebug = 0x000001 // Turn on debugging
FlagSymlink = 0x000002 // Follow symlinks
FlagCompress = 0x000004 // Check inside compressed files
FlagDevices = 0x000008 // Look at the contents of devices
FlagMimeType = 0x000010 // Return the MIME type
FlagContinue = 0x000020 // Return all matches
FlagCheck = 0x000040 // Print warnings to stderr
FlagPreserveATime = 0x000080 // Restore access time on exit
FlagRaw = 0x000100 // Don't translate unprintable chars
FlagError = 0x000200 // Handle ENOENT etc as real errors
FlagMimeEncoding = 0x000400 // Return the MIME encoding
FlagApple = 0x000800 // Return the Apple creator and type
FlagNoCompress = 0x001000 // Don't check for compressed files
FlagNoTar = 0x002000 // Don't check for tar files
FlagNoSoft = 0x004000 // Don't check magic entries
FlagNoAppType = 0x008000 // Don't check application type
FlagNoElf = 0x010000 // Don't check for elf details
FlagNoText = 0x020000 // Don't check for text files
FlagNoCDF = 0x040000 // Don't check for cdf files
FlagNoTokens = 0x100000 // Don't check tokens
FlagNoEncoding = 0x200000 // Don't check text encodings
FlagMime = FlagMimeType | FlagMimeEncoding
// No built-in tests; only consult the magic file
FlagNoBuiltin = FlagNoCompress | FlagNoTar | FlagNoAppType |
FlagNoElf | FlagNoText | FlagNoCDF | FlagNoTokens | FlagNoEncoding
)