[phobos] What's the status of listDir/listdir ?

Dmitry Olshansky dmitry.olsh at gmail.com
Fri Jun 10 05:22:06 PDT 2011


On 10.06.2011 16:19, Andrei Alexandrescu wrote:
> On 6/10/11 4:47 AM, Jonathan M Davis wrote:
>> The main problem with dirEntries is essentially as you point out. It 
>> doesn't
>> work with anything but foreach. You can't even pass it to 
>> std.array.array to
>> create an array. And it's because it's set up to work with either a 
>> string or
>> a DirEntry for the loop variable. The advantage of listdir/listDir is 
>> that you
>> get an actual array of strings to use when you need to pass it to 
>> something.
>> Ideally, DirIterator wolud be made to work with more, but it hasn't 
>> been. I
>> don't know if we want to try and turn it into a range or what, but it 
>> is a bit
>> of a problem if you want to use dirEntries outside of a foreach loop.
>
> Any chance of somebody finding the time to transform dirEntries into 
> an input range? That would solve everything.
>
I decided to try just that. It will take some time though.

-- 
Dmitry Olshansky



More information about the phobos mailing list