prune with dirEntries

Jonathan M Davis jmdavisProg at gmx.com
Thu Nov 29 17:12:59 PST 2012


On Friday, November 30, 2012 01:24:07 Dan wrote:
> Is there a way to walk files with std.file.dirEntries such that
> certain directories are skipped (i.e. how to avoid .git
> entirely/recursively)?

You can use std.algorithm.filter on its result. Then when it would iterate to 
something which doesn't match filter's predicate, it skips it.

- Jonathan M Davis


More information about the Digitalmars-d-learn mailing list