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:

  1. a class base (virtual), basic information (name, parent directory...).
  2. a class file, child of base, represent file.
  3. 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

Popular posts from this blog

c++ - OpenCV Error: Assertion failed <scn == 3 ::scn == 4> in unknown function, -

php - render data via PDO::FETCH_FUNC vs loop -

The canvas has been tainted by cross-origin data in chrome only -