3 ms·
Heh, no respect for history. Short answer, while UNIX had its 'magic' number which looked at the first 32 bits (four bytes) of a file to figure out what kind it
by ChuckMcM 12y ago
Heh, no respect for history. Short answer, while UNIX had its 'magic' number which looked at the first 32 bits (four bytes) of a file to figure out what kind it was (hash bang for the win) and Apple had its own awesomesauce of a 'forked' file system where the file and what it was were in two completely separate but extensible parts of the file system, CP/M (which had emulated DEC) and then DOS which had emulated CP/M used a 3 character (which is only 24 bits but still plenty) to encode the type of file in the name since it couldn't necessarily live in the file itself and there was no 'attribute fork' to stick it in.
Interestingly this is a problem that lives on, people still want to identify what a file is and that requires some sort of identifier. Embedding it in the name is just as good as anything, but the important bit is that you stay consistent. If you're web documents are .htm, .html, .www, .web, etc your configuration gets unwieldy.
- kabdib 12y agoI really liked the Mac "forked" file system. File types and bundles were simple and worked really well. They also facilitated "drag and drop" application installs, where the Finder did most of the work keeping track of where applications lived. The app install process on Windows makes me weep (I think that Visual Studio installs well over 10,000 keys in the registry. What the hell? This number should be zero in a well designed system . . . but don't get me started on the disaster that is COM). Incidentally, Windows NT has file forks. They're not often used, and lots of utilities don't know about them, but they can be quite useful.