tauri-apps / tauri-apps/plugins-workspace

[request] Recursive option for `readDir()`

Open
#2,660 2 comments 0 reactions 0 assignees View on GitHub
plugin: fs type: feature request
Dominant language
Rust
Stars
1.8k
Forks
602
Avg merge
4d 14h
Merged PRs (30d)
9

Description

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.