IWETHEY v. 0.3.0 | TODO
1,095 registered users | 1 active user | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New The Apple guys
And by this I mean the old ones who implemented forked files in HFS original, created two forks with fundamentally different behaviors.

The data fork is what you would think of as a traditional data file - its a bytestream and all the routines to manipulate it treat it like a stream.

The resource fork is more like a database - it maintains an index and provides a means of pulling "named" items from it. It was primarily used for persistent storage of Window Records, Control Records, all of the literal text from the program (for localization), colors, layouts, etc.... There were also code resources - hunks of binary that implemented components of sorts. In fact, old style 68k mac applications had all the binary in the resource fork as various code resources. Hypercard would let you extend the hypertalk language by building a code resource and adding it to a "stack" file. The name of the resource was the name of the function in the Hypertalk language.

The original goal initially was to allow a non-programmer to rework the appearance of an application without ever touching the code. For this basic use, it worked OK. Sadly, it wasn't particularly scalable in implementation and was useful enough to become badly abused by developers. For instance, any given resource couldn't be more than 32k in size (I think - its been awhile - but something lame like that) and you can't have more than 32k resources of a given type.

To answer your other questions, I believe the file sizes reported by HFS take both forks into account.

Because the forks had fundamentally different use patterns and separate apis, nobody ever mixed them up.

Unfortunately, this "trick" became a liability in the wider world because the legacy file systems don't support forked files and many utilities simply left the resource fork behind.

Which sort of begs the question "whats the difference between a directory containing several files of different types and a file containing several different named streams".

From a practical standpoint, I don't see one.

I am out of the country for the duration of the Bush administration.
Please leave a message and I'll get back to you when democracy returns.
New Interesting
Which sort of begs the question "whats the difference between a directory containing several files of different types and a file containing several different named streams".

Now with MS announcing they are working on "database as a filesystem" at some future point, it seems the rest of the world might be catching up to the idea of file-as-a-db. Am I in the right ballpark to think that MS's stated goals are essentially what Macs have been doing for years?
===
Microsoft offers them the one thing most business people will pay any price for - the ability to say "we had no choice - everyone's doing it that way." -- [link|http://z.iwethey.org/forums/render/content/show?contentid=38978|Andrew Grygus]
New Not really
Structured resource forks make really shitty databases.

OTOH, Apple has hired the files system designer from Be - it will be interesting to see where he takes HFS+.

And of course, the AS-400 has had a database for a file system forever (so I'm told - never used one).
I am out of the country for the duration of the Bush administration.
Please leave a message and I'll get back to you when democracy returns.
New Re: The Apple guys
TB wrote

Which sort of begs the question "whats the difference between a directory containing several files of different types and a file containing several different named streams.

On the face of it, the idea of alternate streams as explained above (one of GF's links) does not map onto a heirarchy. Come to think of it, I'm now wondering if VMS doesn't do something like you are describing with journaling (for those who don't know, a VMS filename looks like FILENAME.EXT;2 - if you leave off the numeric qualifier it opens the most recent one). This is more or less a wonderful feature but tends to get abused - lots of garbage files - but results in automatically redundant logs.

So, this doesn't seem to be the same as a "true" directory structure as in UNIX. The big advantage with UNIX emphasis on single streams is that it is easy to graft them here and there - redirection. Alternate streams would enormously complicate redirection, to the point of introducing too much complex overhead for a few happy plus points (even, as with VMS versioning, they are excellent).

Anyway, UNIX has this funny business with names in the form of hard links.
-drl
     This would be my cue to ask this: - (static) - (25)
         Interop is the problem - (tuberculosis)
         Lets just take a look at... - (folkert)
         Re: This would be my cue to ask this: - (deSitter) - (8)
             Here are a few links Ross... - (folkert) - (7)
                 That is a fscking HORRIBLE idea - (deSitter) - (6)
                     Well, thank... - (folkert)
                     Maybe - (drewk) - (4)
                         The Apple guys - (tuberculosis) - (3)
                             Interesting - (drewk) - (1)
                                 Not really - (tuberculosis)
                             Re: The Apple guys - (deSitter)
         It has been discused many times - (JayMehaffey)
         Re: This would be my cue to ask this: - (rickmoen) - (7)
             That also is the idea... - (folkert) - (6)
                 why use ads at all when you have a perfectly good LDAP - (boxley) - (5)
                     Umm, Box... re-read the message and - (folkert) - (4)
                         open your mind ooohhhmmmm - (boxley) - (3)
                             I understand the principle... - (folkert) - (2)
                                 Bang head on floor - (boxley) - (1)
                                     Okay... Okay... Okay... - (folkert)
         Well... this seems somewhat apropos... - (folkert) - (4)
             Cool - (Andrew Grygus)
             It does. - (static)
             Betcha y'all missed *this* little - (Ashton) - (1)
                 No... I saw it.... - (folkert)

Well, there's always "Clippy".
66 ms