List all files in a folder and its subfolders with linq

  • Gérald Barré

How to list all files in a folder and all its subfolders into a single LINQ request?

private static IEnumerable<string> GetFiles(string path)
    return Directory.EnumerateFiles(path)

Do you have a question or a suggestion about this post? Contact me!

Follow me:
Enjoy this blog?Buy Me A Coffee💖 Sponsor on GitHub