C#C
C#3y ago
26 replies
malkav

❔ Reading multiple files/folders inside root/subfolder

So since I'm working with Blazor WASM, apparently there is no way of reading files using Directory.ReadAllFiles() because the Directory returns / and nothing else. At runtime this won't read any folders or files.
So I was bound to using HttpClient to do so.
However, the folder I'm reaching, will eventually have a CMS created number of files (All .md files) and I need a way of reading them all, and then using my parser for each files it finds.
I was hoping there was a way to do this with HttpClient like for example client.GetAsync("localhost:0000/uploads/**/*.md"); but this seems like it isn't possible.


So I come here asking for help finding a way of readnig all .md files inside the /uploads/ folder
(this can be /uploads/fpsettings/settings.md, or /uploads/blogs/blog-slug.md or many more.)
Was this page helpful?