I don't think that the OP wanted to iterate through the entire directory though...
On 17 Mar 2010, at 16:15, Don Quixote de la Mancha wrote: > Does readdir work on Mac OS X? I don't have a Mac handy right now to > check, but it should work because so many *NIX programs build on OS X > right out of the box. > > More or less what you do is call opendir on a directory, then > rewinddir to set your iterator to the beginning of the directory, then > repeatedly call readdir to read each of the items in the directory. > > This is actually a portable and standardized interface to reading the > directory inode. > > Note that there is both a readdir system call and a readdir library > call. You want the library call. The system call is there for the > private use of the library call, and isn't meant to make sense or be > portable. > > If readdir does work on OS X, it will get you the filename as it is > actually found in the filesystem - that is, with the case preserved. > > Look up "man 3 readdir" and friends. > > Don Quixote > -- > Don Quixote de la Mancha > [email protected] > http://www.dulcineatech.com > > Dulcinea Technologies Corporation: Software of Elegance and Beauty. > _______________________________________________ > > Cocoa-dev mailing list ([email protected]) > > 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: > http://lists.apple.com/mailman/options/cocoa-dev/frak.off%40gmail.com > > This email sent to [email protected] _______________________________________________ Cocoa-dev mailing list ([email protected]) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
