Re: File by 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