Re: FSRefMakePath: error -35
Re: FSRefMakePath: error -35
- Subject: Re: FSRefMakePath: error -35
- From: Rosyna <email@hidden>
- Date: Sun, 23 Oct 2005 15:19:07 -0700
It does not matter to the original poster's problem. Creating an
alias is far too slow for the operation at hand.
Or you can convert them to CFDataRefs and store them in the array,
that's rather fast.
CFDataRef fref = CFDataCreate(kCFAllocatorDefault, (UInt8*)inRef,
sizeof(FSRef));
if (fref)
{
CFArrayAppendValue(folders, fref);
CFRelease(fref);
}
Then later...
FSRef folder;
CFDataRef data = (CFDataRef)CFArrayGetValueAtIndex(folders, i);
CFDataGetBytes(data, CFRangeMake(0, sizeof(FSRef)), (UInt8*)&folder);
That's *really* easy to do.
Ack, at 10/23/05, m said:
Except that paths aren't very durable (the user can change the name
of one of the folders in the path and then you're screwed). Maybe
this matters in the OPs case or maybe not. If it does matter, I'd
suggest using BDAlias, a Cocoa class for dealing with aliases. You
can create aliases with a path and store the alias (in the form of
an NSData instance) in a plain ol' NSArray or whatever collection
your heart desires.
--
Sincerely,
Rosyna Keller
Technical Support/Holy Knight/Always needs a hug
Unsanity: Unsane Tools for Insanely Great People
It's either this, or imagining Phil Schiller in a thong.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden