Class MimeType

Represents single MIME type.

class MimeType ;

Constructors

NameDescription
this Create MIME type with name. Name should be given in the form of media/subtype.

Methods

NameDescription
addAlias Add alias for this MIME type. Adding a duplicate does nothing.
addGlob Add glob pattern for this MIME type. Adding a duplicate does nothing.
addMagic Add magic rule.
addParent Add parent type for this MIME type. Adding a duplicate does nothing.
addTreeMagic Add treemagic rule.
addXMLnamespace Add XML namespace.
aliases Aliases to this MIME type.
clearAliases Remove all aliases.
clearGlobs Remove all glob patterns.
clearMagic Remove all magic rules.
clearParents Remove all parents.
clearTreeMagic Remove all treemagic rules.
clearXMLnamespaces Remove all XML namespaces.
clone Create MimeType deep copy.
deleteGlobs Whether to discard globs parsed from a less preferable directory. Used in merges.
deleteGlobs Setter
deleteMagic Whether to discard magic matches parsed from a less preferable directory. Used in merges.
deleteMagic Setter
displayName Descriptive comment of MIME type.
displayName Set descriptive comment.
genericIcon Get generic icon name. Use this if the icon could not be found.
genericIcon Set generic icon name.
getGenericIcon Get generic icon name. The difference from genericIcon property is that this function provides default generic icon name if no explicitly set. The default form is media part of MIME type name with '-x-generic' appended.
getIcon Get icon name. The difference from icon property is that this function provides default icon name if no explicitly set. The default form is MIME type name with '/' replaces with '-'.
globs Array of MIME glob patterns applied to this MIME type.
icon Get icon name.
icon Set icon name.
magics Magic rules for this MIME type.
name The name of MIME type.
name Set MIME type name.
parents First level parents for this MIME type.
treeMagics Treemagic rules for this MIME type.
XMLnamespaces Get XML namespaces associated with this XML-based MIME type.