This example given for the 3-arg version of dirEntries works as expected: --- foreach (string name; dirEntries(".", "*.d", SpanMode.breadth)) { writeln(name); } --- But when modified to use the 4-arg version, like so: --- import std.stdio, std.file; void main() { foreach (string name; dirEntries(".", "*.d", SpanMode.breadth)) { writeln(name); } } --- It fails with this error: fail.d(7): Error: cannot implicitly convert expression (__r13.front()) of type D irEntry to string
Sorry for the copy-paste error. The first example should have been this: --- foreach (string name; dirEntries(".", SpanMode.breadth)) { writeln(name); } ---
Commit pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/58f1b2bc512059bbd36c36324208ed062ffea8f9 Merge pull request #495 from blackwhale/issue-7138 dirEntries issues 7264 & 7138
https://github.com/D-Programming-Language/phobos/pull/495