Open
Description
I just quickly wanted to find the smallest file in a directory with this code:
D> size_t minSize = size_t.max; string minName = "invalid"; foreach (file; dirEntries(getcwd, SpanMode.breadth)) {
| if (file.isFile && file.size < minSize) {
| minSize = file.size;
| minName = cast(string) file;
| }
| } writefln("%s with %s bytes", minName, minSize);
It didn't even try to run that code and just said "Error parsing", however it is valid D code because running it using rdmd --eval
worked
Metadata
Metadata
Assignees
Labels
No labels