Re:File order and directoryContentsAtPath
Re:File order and directoryContentsAtPath
- Subject: Re:File order and directoryContentsAtPath
- From: "James J. Merkel" <email@hidden>
- Date: Sun, 1 Jun 2003 21:20:42 -0700
Jim Merkel wrote:
Cocoa programmers,
If I am looking at a directory in an open panel and have a list of
files like: file1, file2, ... file9, file10, file11, and I use
directoryContentsAtPath, I get an array of strings in the order:
file1, file10, file11, file12, file2 ... file8, file9. How can I get an
array in the order shown in the open panel (or finder)?
An help would be appreciated.
Jim Merkel
It turns out this question was asked about 18-months ago. Search the
archives for kCFCompareNumerically
Norbert Heger provided code to sort an array -- it works great.
I guess I should have thought of kCFCompareNumerically !!
Jim Merkel
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.