What is the API to search for a folder/directory without iterating all children
-
If you mean a search query that calls you back on find then there's no such thing in Qt, but you can easily construct such a class. Call QDir::entryList for a base directory and use contains() on the resulted list. If it's there emit a signal. If not recursively call it on each sub-directory. Shouldn't be much of a hassle.
-
Thank you.
If desired directory is leaf node and tree has so much depth on linux file system, then it would give performance issue. If already indexed for file system, then it's easy to find the entry from database. It shouldn't take long time to find directory. I have find directory in button click event. Any solution?
-
I'm not a linux guy so I won't be of much help, but if all else fails you can always QProcess whatever linux command you think will be the fastest.