D-Programming-Language/phobos — pull request #2768 by marler8997 (2014-11-24 23:12:04+00:00)
Title: Added error handling to dirEntries

Idea to fix https://issues.dlang.org/show_bug.cgi?id=12513.

This PR contains a proposed API change to `dirEntires` that allows the user to pass a callback delegate to handle errors. This PR is for demonstration purposes only to show how the idea could work. I'm currently having troubles building phobos in linux so I haven't built this PR on linux yet. With the current PR on windows, you should be able to pass a callback to allow you to iterate through your entire hard drive. Before this PR, you would run into Access Denied exceptions, but this PR allows the user to skip these files using the errorHandler callback.