HI All,

Can some one provide me a example of how to use the std.container.array for the below code.

import std.algorithm: filter, map;
import std.file: SpanMode, dirEntries, isDir;
import std.stdio: writeln;
import std.typecons: tuple;
import std.array: array;

void main () {
string[] Filesys = ["C:\\Temp\\TEST1\\BACKUP", "C:\\Temp\\TEST2\\EXPORT"];
        foreach(FFs; Filesys) {
auto dFiles = dirEntries("C:\\Temp\\TEST1\\BACKUP", SpanMode.shallow).filter!(a => a.isDir).map!(a => tuple(a.name, a.size));
                foreach(d; dFiles)
                writeln(d[0], "\t", d[1]);
                }
}

From,
Vino.B

Reply via email to