How Documents Know Their Parents
Every operating system needs a mechanism to associate documents with the applications that created them. When you double-click a Microsoft Word document icon, for example, it’s clear that you want Microsoft Word to launch and open the document.
In Windows, every document bears a three-letter file name suffix. If you double-click something called memo.doc, it opens in Microsoft Word. If you double-click memo. wri, it opens in Microsoft Write, and so on.
Mac OS 9 uses a similar system, except that you never see the identifying codes. Instead, it relies on invisible, four-letter creator codes and type codes. Apple carefully monitors and tracks these four-letter codes, in conjunction with the various Mac software companies, so that no two codes are alike.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access