[comp.sys.mac.hypercard] empty but 2K resource forks?

newman@ut-emx.UUCP (Dave Newman) (03/26/89)

I have a couple of stacks that have resource forks which ResEdit 1.2b3
reports as empty of resources but taking about 2K each on disk.  Has
anyone else run into a problem like this?  How do I remove an entire
resource fork from a file?

Thanks for any assistance.

>>Dave

dan@Apple.COM (Dan Allen) (03/30/89)

In article <11455@ut-emx.UUCP> newman@ut-emx.UUCP (David Newman) writes:
>
>I have a couple of stacks that have resource forks which ResEdit 1.2b3
>reports as empty of resources but taking about 2K each on disk.  Has
>anyone else run into a problem like this?  How do I remove an entire
>resource fork from a file?

If a stack has ever had a resource in it, but is now empty, the resource
fork still contains an empty resource map to the tune of 256 or so
bytes.  This will occupy a larger amount on disk depending upon the
sector size of your particular hard/floppy disk.

There is no problem with having an empty resource fork other than the
wasted space on the disk.

You can remove the resource fork of a file by doing a SetEOF of the file
(the resource fork of the file that is) to zero.  This can be done
interactively with Fedit or you can write an MPW Tool, or whatever.
Unfortunately ResEdit itself does not offer this feature.

Early versions of HyperCard liked to open empty resource forks which is
another cause of this problem, but later versions shouldn't do this.

Dan Allen
Apple Computer