[request] Recursive option for `readDir()`
Is there a chance fs.readDir() gets a recursive option?
The documentation shows how to implement your own recursive version. It works but it gets very slow very quickly because there's a frontend-backend-roundtrip for every folder that gets read.
I've implemented the same thing in Rust and transfer all paths in one go back to the frontend. It's a lot faster but it seems it still blocks the main thread. Then I've tried to add threads with the help of AI but that's where I've realized I really need to know Rust in order to implement that properly, which unfortunately I don't.
That's why I think a recursive option would be really beneficial.
It's a lot faster but it seems it still blocks the main thread. Then I've tried to add threads with the help of AI
Did you make the command an async fn? That should prevent the freeze without requiring any complicated code changes.
Oh, that was an easy fix. That works, thank you.