At 02:17 PM 4/20/2003, Edward Diener wrote: >Beman Dawes wrote: >> At 08:22 AM 4/9/2003, Christian Engström wrote: >> >> >In my application I need to handle paths that contain wildcards, >> such as >for example "foo/chapter?.txt" or "bar/*/index.html". >> >> I think that your need is both valid and commonplace, but that the >> way to handle it isn't necessarily to modify the filesystem library. >> >> Rather, think about using a filter iterator. See >> www.boost.org/libs/utility/filter_iterator.htm >> >> There are a couple of caveats: (1) I haven't actually tried it, so >> don't >> know if it is a practical solution, and (2) Dave, Jeremy, and Thomas >> are working on a major update to iterator adaptors so details may >> change once they are done. > >What good is a filter iterator adaptor supposed to accomplish in this >situation ?
The idea is that rather than directory iteration returning iterators for all path entries, it would only return those which passed a predicate which was driven by the pattern. For some uses, the pattern might more flexibly be a regular expression rather than the traditional (but non-portable) wildcard patterns provided by various operating systems.
--Beman
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost