Enumerate directory for a collection of metadata objects, not names
See the question and my original answer on StackOverflowThat would be the DirectoryInfo.EnumerateFileSystemInfos Method which
Returns an enumerable collection of file system information (
System.IO.FileSystemInfo) in the current directory.