• 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: File by index?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: File by index?


  • Subject: Re: File by index?
  • From: Jens Alfke <email@hidden>
  • Date: Wed, 17 Apr 2013 15:47:31 -0700

On Apr 17, 2013, at 3:27 PM, Steve Mills <email@hidden> wrote:

> Bleah. That looks sufficiently complicated (didn't even show up in Terminal's man search). I'll just stick with being inefficient if Apple can't provide a high-level easy-to-use replacement for a routine I and many others used to use often.

To me, readdir/seekdir look pretty darn simple, definitely much simpler than the old PBxxx APIs! I recall those being a real pain in the ass, with the requirement for setting up all those fields of the param block. There's also probably a ton of sample code you can search for, since these functions have been around for literally 30 years. (There's a basic example at the bottom of the man page, actually.)

The only issue seems to be that the the position parameter to seekdir may not be as simple as the index of the item in the directory listing; the man page implies it should be treated as an opaque value returned by telldir. If you want to pursue this, the darwin-userlevel list would be the best place to ask.

—Jens

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


References: 
 >File by index? (From: Steve Mills <email@hidden>)
 >Re: File by index? (From: Jens Alfke <email@hidden>)
 >Re: File by index? (From: Steve Mills <email@hidden>)
 >Re: File by index? (From: Jens Alfke <email@hidden>)
 >Re: File by index? (From: Steve Mills <email@hidden>)
 >Re: File by index? (From: Jens Alfke <email@hidden>)
 >Re: File by index? (From: Steve Mills <email@hidden>)

  • Prev by Date: Re: File by index?
  • Next by Date: Re: Detecting application bundle being moved
  • Previous by thread: Re: File by index?
  • Next by thread: Re: File by index?
  • Index(es):
    • Date
    • Thread