Datatype registry

In order for something to be recognized, it first has to be known. The desktop allows you to add data-type files that describe how the system can recognize files based on their last name. So when the system boots, the following directory is scanned and the .datatype files are loaded into memory:

~\devs\datatypes\

Once loaded they form a small database in memory, and applications can query the desktop for insight into a file through the public API; but most of the time the desktop uses this information to display files correctly. There are several reasons why such a registry of datatypes are important:

  • Content: it informs the system what a file should contain
  • Representation: It allows the system to apply the correct icon to represent the file
  • Action: What should happen when you double-click a text document?
  • Ownership: What application is defined as a datatype’s default owner?

Actions is a concept with far more depth to it than what we touch uoun here. But in short the desktop allows you to define not only what action to take (like open, copy, move, un-compress and many others) but also what application or script that delivers this functionality. A html document is best handled by a browser for instance, while a text file is best served in a text editor.

Note: The system that deals with actions, or class actions as they are called, is a much larger subject. Please refer to the class-action documentation to study this topic further.

Advertisements