Help required on Array appender
    Vino.B via Digitalmars-d-learn 
    digitalmars-d-learn at puremagic.com
       
    Sat Sep  2 03:15:04 PDT 2017
    
    
  
Hi All,
  Can you please guide me how can i use array appender for the 
below piece of code
string[][] cleanFiles (string FFs, string Step) {
auto dFiles = dirEntries(FFs, SpanMode.shallow).filter!(a => 
a.isFile).map!(a => tuple(a.name , a.timeCreated)).array;
	foreach (d; dFiles) {
		     if (Step == "dryrun")
			    { Subdata ~=  [d[0], d[1].toSimpleString[0 .. 20]]; }
				  else if (Step == "run") {
					remove(d[0]);
					if (!d[0].exists)
					Subdata ~=  [d[0], d[1].toSimpleString[0 .. 20]];
						}
			}
			return Subdata;
}
From,
Vino.B
    
    
More information about the Digitalmars-d-learn
mailing list