|
Boost Users : |
From: Lawrence Spector (Lawrence.Spector_at_[hidden])
Date: 2007-10-03 15:25:54
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_at_[hidden] [mailto:boost-users-bounces_at_[hidden]] On Behalf Of Nat Goodspeed
Sent: Wednesday, October 03, 2007 10:52 AM
To: boost-users_at_[hidden]
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_at_[hidden]
http://lists.boost.org/mailman/listinfo.cgi/boost-users
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