Sunday, December 12, 2010

Lesson 15: Making a New File Type

Depending on what kind of projects you write, you may have to create a new file type from time to time, such as a document type for the next Word-killing word processor. While not difficult, making one needs a bit of knowledge from different places in the OS and the API. In our final lesson which focuses on the Storage Kit, we will learn about MIME types, how to show the OS how to automatically identify files of your new type, and more.

Programming with Haiku, Lesson 15

2 comments:

  1. Even under Haiku, it's better to still call BMimeType::Install(). API-wise, you're suppose to call it to make the mime type permament.

    In the future, Haiku MIME database implementation may change making non-resilient any type not officially Install()'ed, for instance.

    ReplyDelete
  2. Your section about MIME sniffing rules rulez ;-)
    It will be definitivaly welcome in HaikuBook, for instance (hint hint)...

    ReplyDelete