Re: AppleDouble format
Re: AppleDouble format
- Subject: Re: AppleDouble format
- From: Rainer Brockerhoff <email@hidden>
- Date: Mon, 5 Nov 2001 20:54:37 -0200
At 16:40 -0600 on 05/11/2001, Charles Srstka wrote:
>
On Monday, November 5, 2001, at 04:01 PM, Rainer Brockerhoff wrote:
>
>Opening the resource fork normally (with the calls in "Files.h" or "Resource.h") will give you this transparently. You don't need to know whether this is a UFS volume.
>
>
Yes, but in my case I am sometimes going to end up with an AppleDouble-encoded file on an HFS volume. Don't ask me why. It is unavoidable. I need to convert this to a normal HFS file. Currently I have to move the file to a UFS disk and back to convert it, which is obviously unacceptable. Unfortunately, I haven't been able to find any methods that would tell how to convert the files, but there must be a way to do it.
Well, it sounded too easy :-)
I'm not sure if the .-file contains only the resource fork itself, or also other stuff.
If it contains only the resource fork, open it with FSOpenResourceFile, passing 0 and NULL in the 2nd and 3rd parameters - this will open it as a data-fork resource file. You can access the resources then.
But I suppose that the ._file also contains other metadata... in that case you'll probably have to extract the resource fork part first somehow.
--
Rainer Brockerhoff <email@hidden>
Belo Horizonte, Brazil
"Originality is the art of concealing your sources."
http://www.brockerhoff.net/ (updated Oct. 2001)