On Wednesday, 6 December 2017 at 14:49:48 UTC, Vino wrote:
Hi Andrea,
Thank you very much, as your code is pretty good for our
scenario, just one request, the above is a part of our main
code where we have many such sub code and all of our sub code
use the container array(std.container.array) rather than
standard array(std.array), so can you please guide me on how to
implement the same code using the container array.
From,
Vino.B.
Just use Array! constructor.
auto mSize () {
string FFs = "/home/andrea/Scaricati";
return
Array!(Tuple!(string,string))(
dirEntries(FFs, SpanMode.shallow)
.filter!(a => a.isDir)
.map!(a => tuple(a.name,
a.dirEntries(SpanMode.depth).filter!(a=>a.isFile).map!(a =>
a.size).sum))
.filter!(a => a[1] > 1024*1024*30)
.map!(a => tuple(a[0], a[1].to!string))
);
}