This project is read-only.

Please fix Directory.EnumerateFiles / EnumerateDirectories

Dec 26, 2013 at 7:56 AM
Can you please fix the Microsoft bug that makes Directory.EnumerateFiles (EnumerateDirectories, etc). unusable due to uncatchable exceptions breaking enumerations.

I'm thinking of an overload with a parameter allowing to enumerate all accessible paths ignoring exceptions (IgnoreErrors = true).

The bug is submitted here and they can't fix it for four years:

https://connect.microsoft.com/VisualStudio/feedback/details/512171/directory-enumeratedirectory-etc-unusable-due-to-frequent-unauthorizedaccessexceptions-even-runas-administrator#
Developer
Dec 26, 2013 at 12:22 PM
Edited Dec 26, 2013 at 12:23 PM
Hi ShreddedSoul,

The latest dev build already has this:

public static IEnumerable<string> EnumerateDirectories(string path, string searchPattern, SearchOption searchOption, bool continueOnAccessError)

public static IEnumerable<string> EnumerateFiles(string path, string searchPattern, SearchOption searchOption, bool continueOnAccessError)

public static IEnumerable<string> EnumerateFileSystemEntries(string path, string searchPattern, SearchOption searchOption, bool continueOnAccessError)

Regards,
Yomodo
Dec 26, 2013 at 10:22 PM
Thank you very much! You're the best!
Marked as answer by Yomodo on 1/6/2014 at 3:26 PM
Dec 30, 2013 at 3:03 PM
How do I get the latest dev build?
Developer
Dec 31, 2013 at 11:58 AM