Hey trolls,
I want to retrieve every file name in a directory.
I'm doing this:
And guess what... When you have 10000+ files in a directory It's very slow.
Is it possible to retrieve files by chunk, like 100 by 100 or something ?
Thanks.
Printable View
Hey trolls,
I want to retrieve every file name in a directory.
I'm doing this:
And guess what... When you have 10000+ files in a directory It's very slow.
Is it possible to retrieve files by chunk, like 100 by 100 or something ?
Thanks.
Well, you could call entryList() repeatedly to get first all files starting with a, then b,...
- doesn't help though, when all files start with a common prefix...
A single call to entryList() takes as long as it takes.
You can file a request for enhancement with the trolls if you think it is slower than it should/could be.
HTH
Have a look at QDirIterator: it will allow you to navigate directory entries once at a time, and might satisfy more to your needs.
QDirIterator is the way to go for non blocking directory browsing.