
13 Jan
2004
13 Jan
'04
11:45 p.m.
Folks-- Is there general interest in a "globbing" iterator? If so I've got one I'm willing to re-package for submission. (Or at least discuss with folks for improvement) If you're interested, read on: glob_iterator aggregates a directory_iterator and regex to provide shell-style "*", "?", "{....}", "[....]" and "[^...]" wildcarding. boost components used: filesystem::directory_iterator filesystem::path filter_iterator reg_expression c_regex_traits Usage example: //...do something to all .cpp and .c files glob_iterator start( "*.{c,cpp}" ); glob_iterator end; while( start != end ){ std::string filename( start->leaf() ); //...do something with/to filename ++start; }