Different Output after each execution

Vino.B via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Aug 19 07:20:54 PDT 2017


On Friday, 18 August 2017 at 16:53:46 UTC, Moritz Maxeiner wrote:
> On Friday, 18 August 2017 at 15:46:13 UTC, Vino.B wrote:
>> [...]
>
> Negating the filtering rule should yield you the inverse set:
>
> ---
> dirEntries(i, SpanMode.shallow).filter!(a => a.isDir).filter!(a 
> => !globMatch(a.baseName, "*DND*"))
> ---
>
> Also I don't see a reason to use two filter invocations here, 
> you can join the conditions to a single filter (same for the 
> unnegated one):
>
> ---
> dirEntries(i, SpanMode.shallow).filter!(a => a.isDir && 
> !globMatch(a.baseName, "*DND*"))
> ---

Thank you very much, it resolved the issue and also update my 
code as advised.


More information about the Digitalmars-d-learn mailing list