file system indexing
Hi all,
I need to search for a particular directory without iterating children/comparing directory names on Linux. Does Linux maintains file system indexer like spotlight on mac. Search has to finish in button click event. any solution? Thanks, dc |
Just use find or locate, you have to update the index, with
Code:
sudo updatedb |
Thank you.
interesting. Is it possible to use this in C++ desktop application? Is it possible to open mlocate.db? What kind of database it is. |
Well I asume, yes depends on how you want the out, you can invoke system commands in C++.
But do you want the string reply? or how do you want it representated ? Remember to thank post, which helps you :) |
I need the output in string only. First occurrence of directory path.
|
> I need to search for a particular directory without iterating children/comparing directory names on Linux. Search has to finish in button click event.
You might want to get this information at once, but it still might be impossible. The usual method is start a background thread (or activate a pre-created background thread) when the user presses the button, and show the result when it is available. |
Check this SO thread: http://stackoverflow.com/questions/4...mmand-within-c
First answer should tell you what to do |
All times are GMT -5. The time now is 04:28 PM. |