Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- boost::filesystem::path p("E:"); //Will iterate only over local directory (E:\projects\iter\build)
- boost::filesystem::recursive_directory_iterator end_itr;
- for(boost::filesystem::recursive_directory_iterator itr(p); itr != end_itr; ++itr) {
- boost::filesystem::path currentPath = itr->path();
- .
- .
- .
- ------
- boost::filesystem::path p("E:\\"); //Will NOT iterate at all
- boost::filesystem::recursive_directory_iterator end_itr;
- for(boost::filesystem::recursive_directory_iterator itr(p); itr != end_itr; ++itr) {
- boost::filesystem::path currentPath = itr->path();
- .
- .
- .
- ------
- boost::filesystem::path p("E:\\some-dir"); //Will iterate without a problem
- boost::filesystem::recursive_directory_iterator end_itr;
- for(boost::filesystem::recursive_directory_iterator itr(p); itr != end_itr; ++itr) {
- boost::filesystem::path currentPath = itr->path();
- .
- .
- .
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement