Boost logo

Boost :

Subject: Re: [boost] [filesystem] #6521 Directory listing using C++11 range-based for loops
From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2012-04-23 11:26:51


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.

-Thorsten


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk