Re: AppleDouble format
Re: AppleDouble format
- Subject: Re: AppleDouble format
- From: Charles Srstka <email@hidden>
- Date: Thu, 8 Nov 2001 04:16:30 -0600
Hmm, is it considered bad form to simply use NSFileHandle and append a
/rsrc to the end of the file path and just write to that? Because I just
tried doing that to put the data from Extras.rsrc in the resource fork
of a data file, just to see if it would work, and it did...
On Tuesday, November 6, 2001, at 08:00 AM, Peter Johnson wrote:
There is a pdf at
<http://www.lazerware.com/formats/Specs/AppleSingle_AppleDouble.pdf>
that documents the AppleDouble (and AppleSingle) formats.
I believe the ._filename file has a bunch of meta-data in the file as
well as the resource fork data.
It should be relatively easy to extract the "resource fork" out of the
._filename file, and then, using the Carbon APIs, create the resource
fork on the data file, open the resource fork as a "normal" fork (i.e.
don't open it as a resource file), and write the resource fork data to
it. At that point I believe you will have essentially recovered your
original dual-forked file. Of course, you may want to do something
with the meta-data in the ._filename file as well, like set the file
type and creator.
Some Carbon APIs you might be interested in:
FSpCreateResFile
FSpOpenRF (not FSpOpenResFile)
FSClose
Those are FSSpec based, which I am drawing from memory. I'm sure there
are FSRef based equivalents.
Hope that helps...
On Monday, November 5, 2001, at 02:46 PM, Charles Srstka wrote:
Does anyone know of a way to programmatically decode those ._filename
AppleDouble files that UFS uses into actual HFS resource forks? Also,
is it possible to determine the format of a drive programmatically?
_______________________________________________
cocoa-dev mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
_______________________________________________
cocoa-dev mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/cocoa-dev