Recursive file enumerator
It would be useful if System.IO.Directory.EnumerateFiles() had an option to recursively iterate a directory and it's sub-directories for files.
This is a good idea
At least in C# w/ Windows there's some special cases that need to be handled when doing that from C#, if you want it to work in every case. Some cases that might need special handling (good to have for tests). Leaves open the question of should the API have a way for handling these by the user or have the API handle these for the user:
- folder that require some permission both in local and remote shared folder (SMB etc)
- junction point (use mklink)
- reparse point (use diskmgmt.msc)
- link (file/folder, use mklink)
- long paths
- recursive paths
Additionally I know that using multiple threads can improve performance on SMB share. .NET BCL has SearchOption.AllDirectories but that fails in some of the cases mentioned above.
Here's someones speed test using FIND_FIRST_EX_LARGE_FETCH, which is a good flag for recursive file enumeration. https://stackoverflow.com/a/15776443