Re: [NTLK] Stuff It......why I now hate it

From: Michael J. Hußmann <michael_at_michael-hussmann.de>
Date: Thu Mar 22 2007 - 17:58:59 EDT

matthiasm (mm@matthiasm.com) wrote:

> First off, forks are deprecated and not used anymore in OS X.

Actually, that's not true. Even Mac OS X itself is storing data in the
resource fork. For example, if you change the application that should be
used to open some file, the Finder will store this info in an "usro"
resource within the file's resource fork. And there's a good reason for
doing it this way, as the file can neither be turned into a package, nor
may the Finder mess with its data fork.

> They
> have been replaced by something called "Packages" (which is simply a
> folder with the specific name extension ".app".

Application packages (there are also other kinds of packages with
different extensions) contain new-style resource files, storing
resources within their data fork. This is fine for packages, but when
you need to store additional data with a file, the resource fork is your
only option.

> Buuuut, for all those stuck with OS pre-X, resource and data forks
> are important. On a Mac, files have two forks that are very
> independent. Resource forks used to define a lot of the inner
> workings of applications, their signatures, icons, windows, widgets,
> texts, etc. etc. . Data forks contained only the executable code.

There are still native Mac OS X apps that are structured like this.
Applications don't have to be application packages.

> Unfortunately, instead of just defining a chunk system, Apple
> reinvented the wheel and create a new file system from scratch that
> supported these forks. All other file systems and all standard file
> functions for programmers only see the data fork. So whenever you
> copy a Mac file to a non-Mac machine, or archive with a non-Mac
> program, your resource fork is lost, including all user interface
> data, icon, creator dtata, etc. etc. . Buh-bye.

Many applications were smart enough to preserve the resource fork. Since
about 1990, the Finder could copy Mac files to FAT volumes (which didn't
know about forks), storing the two forks transparently as two files. Mac
OS X still does this, albeit differently from Mac OS. When you uploaded
Mac files to an FTP server, the FTP client would automagically encode
the file in the MacBinary format, again preserving the resource fork,
plus type and creator codes and other meta-data.

- Michael

Michael J. Hußmann

E-mail: michael@michael-hussmann.de
WWW (personal): http://michael-hussmann.de
WWW (professional): http://digicam-experts.de

-- 
This is the NewtonTalk list - http://www.newtontalk.net/ for all inquiries
Official Newton FAQ: http://www.chuma.org/newton/faq/
WikiWikiNewt for all kinds of articles: http://tools.unna.org/wikiwikinewt/
Received on Thu Mar 22 17:59:47 2007

This archive was generated by hypermail 2.1.8 : Thu Mar 22 2007 - 19:30:00 EDT