c++ - Indexing file names and its content -
i write program index file names , content in given directory. if match given regular expression, index them. use regex functions.
i don't know how start this.
i use polymorphic approach:
- a class base (virtual), basic information (name, parent directory...).
- a class file, child of base, represent file.
- a class folder/directoy represent directory.
i thinking using map build trees.
may tell me opinion please?
for filesystem functionality, use boost.filesystem.
for regular expressions, use <regex>
c++11, boost.regex otherwise.
any initial(!) trouble might have when installing , learning boost pay off.
for map, use std::map
.
in case, not reinvent wheel.
Comments
Post a Comment