Re: Can I skip sub directories with file.dirEntries() ?

2017-09-27 Thread Ky-Anh Huynh via Digitalmars-d-learn
On Wednesday, 27 September 2017 at 10:05:34 UTC, Nicholas Wilson wrote: I'd just use dirEntries with SpanMode.shallow in combination with filter either in a loop or a recursive function like below. void foo(string path = "path") { foreach(e;

Re: Can I skip sub directories with file.dirEntries() ?

2017-09-27 Thread Nicholas Wilson via Digitalmars-d-learn
On Wednesday, 27 September 2017 at 09:00:55 UTC, Ky-Anh Huynh wrote: Hi, Can I have a `break` option when using `dirEntries()` (similar to `break` in a loop)? I want to study sub-directories but if any sub-directory matches my criteria I don't to look further into their subdirectories ```

Can I skip sub directories with file.dirEntries() ?

2017-09-27 Thread Ky-Anh Huynh via Digitalmars-d-learn
Hi, Can I have a `break` option when using `dirEntries()` (similar to `break` in a loop)? I want to study sub-directories but if any sub-directory matches my criteria I don't to look further into their subdirectories ``` A/ -> matches criteria, stop here, go to next directory (B)