So I want to store pairs string-path <-> my_file_object in such container with expected total object size 100 000.
- I need to have search by absolute path to get an object for example I could search for
a/b/c/file.h) - I need to be capable to list all item names in
folderlike foldera/b/c/contains filesfile.h,file.cpp, folderbin/and folderbin2/ - I need to be capable to add new
filesby absolute path, and update them. - I need to be capable to delete
files.
I wonder about fiew things – is there a container for such things in STL/boost? Is this implementation threadsafe for read?
Also I wonder if it is any way faster than have all my pairs inside of std::map<string, object> so I would have fast search, fast insert and delete, and folder files listing via code like this?
What requirements do you have that rule out
std::map? As far as I can see it will work well here: