[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Forked Files
Robert Flossmann wrote:
>
> Hi all,
> could someone please help me understand the concept of forked files, as
> I keep running into these when toying around with my Apple IIe/IIGS and
> Macs. I understand that there are two parts to an Apple file, the data
> fork and the resource fork. Now for some questions:
Just to clarify, the Apple IIe doesn't support forked files at all, and
the GS (under GS/OS) can use either forked or unforked files.
> * Are the two forks stored in a contiguous manner (1 file) or as two
> seperate files?
One file...it is actually stored as two mini-files at the deepest
filesystem level, but this is hidden from users--including both end
users AND programmers who use OS facilities to access the files.
> * What does the data and resource forks contain respectively for, say,
> an application, a text file, a graphics file?
Whatever the programmer of the application that created the file WANTED
them to contain. For applications, the data fork usually holds program
code while the resource fork holds user interface items (window layouts,
menus, etc.) For data files, it really varies. Teach files, for
example, hold raw text data in the data fork and formatting information
(fonts, margins, etc.) in the resource fork...so if you transfer a Teach
file to a PC and lose the resource fork, you still get the plain text
sans formatting.
> * What is lost on transfer of, say, a text file to a Windoze PC?
Text files usually don't have a resource fork. And ones that do (Teach
files) will still be readable if transferred to a PC; you'll just lose
your pretty formatting.
- References:
- Forked Files
- From: Robert Flossmann <robert.flossmann@freenet.de>