MimeDatabase.Match

Options for mimeTypeForFile

Values

ValueMeaning
globPatterns1

Match file name against glob patterns.

magicRules2

Match file content against magic rules. With MatchOptions.globPatterns flag it's used only in conflicts.

namespaceURI4

Try to clarify mime type in case it's XML.

inodeType8

Provide inode/* type for files other than regular files.

textFallback16

Provide text/plain fallback if data seems to be textual.

octetStreamFallback32

Provide application/octet-stream fallback if data seems to be binary.

emptyFileFallback64

Provide application/x-zerosize fallback if mime type can't be detected, but data is known to be zero size.

allglobPatterns | magicRules | namespaceURI | inodeType | textFallback | octetStreamFallback | emptyFileFallback

Use all recipes to detect MIME type.

Meta