• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: FSRefMakePath: error -35
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >FSRefMakePath: error -35 (From: Lawrence Sanbourne <email@hidden>)
 >Re: FSRefMakePath: error -35 (From: Tommy Nordgren <email@hidden>)
 >Re: FSRefMakePath: error -35 (From: Lawrence Sanbourne <email@hidden>)
 >Re: FSRefMakePath: error -35 (From: Finlay Dobbie <email@hidden>)
 >Re: FSRefMakePath: error -35 (From: Lawrence Sanbourne <email@hidden>)
 >Re: FSRefMakePath: error -35 (From: Lawrence Sanbourne <email@hidden>)
 >Re: FSRefMakePath: error -35 (From: Lawrence Sanbourne <email@hidden>)
 >Re: FSRefMakePath: error -35 (From: Lawrence Sanbourne <email@hidden>)
 >Re: FSRefMakePath: error -35 (From: Rosyna <email@hidden>)
 >Re: FSRefMakePath: error -35 (From: m <email@hidden>)

  • Prev by Date: Re: Problems drawing... Need help please.
  • Next by Date: Re: Dynamically changing an application's icon / Adding a badge
  • Previous by thread: Re: FSRefMakePath: error -35
  • Next by thread: Re: FSRefMakePath: error -35
  • Index(es):
    • Date
    • Thread