Expand description
What the database knows about a type, as opposed to about a file: its other names, what it is a kind of, and what to call it in front of a person.
Three more plain files next to globs2:
aliases—alias canonical, one per line.application/acrobatisapplication/pdfunder an older name, and a lookup that does not resolve it will miss a perfectly good association.subclasses—child parent. A.3mfis a zip and aapplication/yamlis text; an application registered for the parent can open the child.<media>/<subtype>.xml— the type’s<comment>, translated. “STL 3D model” rather thanmodel/stl.
§The two subclass rules that are not in the file
The specification states them in prose and every implementation has
to add them by hand: every text/* is a subclass of text/plain,
and everything whatsoever is a subclass of
application/octet-stream. Leave them out and “can this application
open this file” answers no for every text editor and every file.
Structs§
- Types
- The type graph: aliases, subclasses and descriptions.
Functions§
- description_
of - One type’s description, read and not remembered.
- inode_
type - Whether
pathis something other than an ordinary file, and what the database calls that. - mime_
dirs - Every
mimedirectory to read, for a caller that has its own list of XDG data directories.