Re: [Q] Directory & File enumeration order?

2011-07-20 Thread JongAm Park
I understood what you said. For the performance, well.. it depends on what kind of S/W it is and how often it needs to sort internally. In my case, I don't think it will be too slow, but I always consider fast performance. Without testing, I can think that it is slow. But whether it is practical

Re: [Q] Directory & File enumeration order?

2011-07-20 Thread Jens Alfke
On Jul 20, 2011, at 2:09 PM, JongAm Park wrote: > How can I make it retrieve in this order? > > Clip_0016_00.dpx, > Clip_0016_01.dpx, > Clip_0016_02.dpx, I don’t think you can. In general, file systems do not have to store directory contents sorted by name. It happens that HFS+ doe

Re: [Q] Directory & File enumeration order?

2011-07-20 Thread JongAm Park
Yeah.. that was what I thought, but I thought "nextObject" is too vague and doing that additional step is too time-consuming, because I need to work on contents in directories in my current project very frequently. If the NSDirectoryEnumerator supports how the "next" object is to be chosen, it

Re: [Q] Directory & File enumeration order?

2011-07-20 Thread Evadne Wu
Maybe instead of using the directory enumerator, fetch all the contents as an NSArray and sort that? -ev On Jul 21, 2011, at 05:09, JongAm Park wrote: > Hello, I wrote lines of code to enumerate files & folders under a given > folder. > > NSFileManager *fileManager = [[[NSFileManager alloc] i

[Q] Directory & File enumeration order?

2011-07-20 Thread JongAm Park
Hello, I wrote lines of code to enumerate files & folders under a given folder. NSFileManager *fileManager = [[[NSFileManager alloc] init] autorelease]; NSDirectoryEnumerator *directoryEnumerator; NSURL *candidateURL = nil; for( theURL in m_URLs_folders ) { directoryEnumerator = [fileManager