• 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: Lawrence Sanbourne <email@hidden>
  • Date: Sun, 23 Oct 2005 11:07:30 -0500

On 10/23/05, Dair Grant <email@hidden> wrote:

> Lawrence Sanbourne wrote:
>
> >> It *will* fail on some people's computers. Try to use something much
> >> larger (if possible). I usually use PATH_MAX*6, although that still
> >> isn't the best way to do it.
> ...
> >
> >Hmm, this sounds ugly. I think for simplicity I'll use PATH_MAX*6.
>
> Given that you're calling yourself recursively, is there some reason you
> don't just take an FSRef as your parameter?
>
> That would cut out the FSRef->path and path->FSRef overhead, and avoid
> the problem of failing if (when) your path exceeds PATH_MAX (*6 is just
> deferring the point at which it happens - if you stick to FSRefs, you'll
> be able to recurse to arbitrary depths).

I used an NSString as a parameter because I wanted it to have a Cocoa
interface, but you're right about the inefficiency. I'll create a
second private function that does all the work, including the
recursion, and make the public one have an NSString interface.

Is there some existing NS* class that I should graft this on as a
category? I'm trying to imagine where Apple would put it if they were
adding it.

Larry
--
Larry Sanbourne
email@hidden
 _______________________________________________
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

  • Prev by Date: Re: Resizing bezier objects.
  • Next by Date: Re: 24-hour default
  • Previous by thread: Re: FSRefMakePath: error -35
  • Next by thread: Finding the relative order of days and months and years
  • Index(es):
    • Date
    • Thread