
Correct. That is the issue. It's not just wildcards, it also seems that directory_iterator won't handle a single file either (e.g.: C:\config.sys). The file_iterator in regex just seems like it's in the wrong place. I also think this is common functionality that one can't reasonably be expected to know exists without deep digging (my coworker found it by suspecting that it would likely call FindFirstFileA in its implementation and searching on that). Also, the file_iterator in regex doesn't seem to precisely follow the directory_iterator's style. For example, you can't pass a boost::filesystem::path object to the file_iterator. Another issue is that there's no wide version of the file_iterator. I do think this needs some cleaning up, if for no other reason than it seems inconsistent. Thanks, Lawrence -----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Nat Goodspeed Sent: Wednesday, October 03, 2007 10:52 AM To: boost-users@lists.boost.org Subject: Re: [Boost-users] [Boost.FileSystem] File or Wildcards in Path? How-to do this? Lawrence Spector wrote:
We are using Boost 1.34.0. This is something in the current version of Boost, which seems to only allow Directory paths to be used in a boost::filesystem::directory_iterator. So, the question I present would be whether or not there's another construct for doing this? My coworker found something in boost/regex/v4/fileiter.hpp called file_iterator, which seemed to achieve the correct result, but why isn't this part of Boost.Filesystem? Or is it and I'm just missing something?
Ah. I mistook the problem you were having, sorry. So to try to clarify: the problem you're actually experiencing is that you get an exception when you pass a wildcard string to directory_iterator? While I can sympathize with your request, I guess I find it defensible that wildcard matching would need the regex library. _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users