Boost logo

Boost :

Subject: Re: [boost] [filesystem] #6521 Directory listing using C++11 range-based for loops
From: Olaf van der Spek (ml_at_[hidden])
Date: 2012-04-23 11:29:42

On Mon, Apr 23, 2012 at 5:26 PM, Thorsten Ottosen
<thorsten.ottosen_at_[hidden]> wrote:
> On 20-04-2012 15:27, Dave Abrahams wrote:
>>> What we would really like is to be able to apply a series of filters,
>>> some of which apply to directories, some to files. Examples are your
>>> include|exclude regex filters, applicable to directories|files|both.
>>> Another filter might be a file filter<=|>= a given size. Dates and
>>> permissions filters would also be useful. Perhaps user supplied
>>> filters. And how about filters applied to the contents of files?
>> And then there's
>>     directory_range('some_path') | filtered(predicate1) |
>> filtered(predicate2) ...
> [Thorsten:]
> My original reason for embedding the regexes directly in the iterators was
> that it could be made to run somewhat more efficient because the iterators
> could peek at the low-level api and perhaps void string conversions. Filters
> applied afterwards does seem to scale much better, but I wonder how much
> slower it would get. This is not a personal problem for me, but it may to
> some.

Can't you move the filtering to the second argument of directory_range
(somehow) while keeping genericity?


Boost list run by bdawes at, gregod at, cpdaniel at, john at