Re: AppleDouble format
Re: AppleDouble format
- Subject: Re: AppleDouble format
- From: Charles Srstka <email@hidden>
- Date: Mon, 5 Nov 2001 16:40:24 -0600
On Monday, November 5, 2001, at 04:01 PM, Rainer Brockerhoff wrote:
Date: Mon, 5 Nov 2001 13:25:13 -0800
From: Vince DeMarco <email@hidden>
On Monday, November 5, 2001, at 11:46 am, Charles Srstka wrote:
Does anyone know of a way to programmatically decode those ._filename
AppleDouble files that UFS uses into actual HFS resource forks?
I don't know this one.
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.
The reason I asked how to tell if a disk is a UFS disk is simply that I
don't want to do the conversion if the file is on a UFS disk for the
obvious reasons.
So, any ideas?
Thanks,
Charles Srstka
Also, is it possible to determine the format of a drive
programmatically?
use statfs()
...
look at the f_fstypename field
You can also call FSGetCatalogInfo on the file to get the "volume"
field, pass this to FSGetVolumeInfo and then check the returned
"filesystemID" field. This will contain '\000\000cu' for UFS.
--
Rainer Brockerhoff <email@hidden>
Belo Horizonte, Brazil
"Originality is the art of concealing your sources."
http://www.brockerhoff.net/ (updated Oct. 2001)
_______________________________________________
cocoa-dev mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/cocoa-dev