voID selective_search( const path &search_here,const std::string &exclude_this_directory){ using namespace boost::filesystem; recursive_directory_iterator dir( search_here),end; while (dir != end) { // make sure we don't recurse into certain directorIEs // note: maybe check for is_directory() here as well... if (dir->path().filename() == exclude_this_directory) { dir.no_push(); // don't recurse into this directory. } // do other stuff here. ++dir; } }总结
以上是内存溢出为你收集整理的c – boost :: filesystem :: recursive_directory_iterator带过滤器全部内容,希望文章能够帮你解决c – boost :: filesystem :: recursive_directory_iterator带过滤器所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)