Boost logo

Boost Users :

From: Nat Goodspeed (nat_at_[hidden])
Date: 2007-10-02 16:16:04


Lawrence Spector wrote:

> std::string folderName = "C:\\*.sys";
> boost::filesystem::path fsDirectoryPath =
> boost::filesystem::system_complete(
> boost::filesystem::path(folderName,
> boost::filesystem::native));
> boost::filesystem::directory_iterator end_iter;
>
> for (boost::filesystem::directory_iterator
> dir_itr(fsDirectoryPath);
> dir_itr != end_iter; ++dir_itr) // throws exception
> {
> std::cout << "Contains the following file: " <<
> dir_itr->string() << std::endl;
> } // end for
>
> When I do this, I get the following exception:
>
> boost::filesystem::basic_directory_iterator constructor

   Are you using Boost 1.34? If not, it might be worth trying. If I'm
right about the exception you're getting, I believe it's been eliminated
in 1.34.
   If you're locked into a previous version of Boost, try passing
boost::filesystem::no_check instead of boost::filesystem::native.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net