What are the specific use cases for tauri-plugin-persisted-scope
?
#8540
-
https://github.com/tauri-apps/plugins-workspace/tree/v2/plugins/persisted-scope |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
It saves scope configs added via these apis https://docs.rs/tauri/latest/tauri/scope/struct.FsScope.html, the built-in dialog, and file drops (if tauri's file drop is enabled) to disk so they are preserved across app restarts. Example: Imagine you're working on a code editor, your user clicks on "Open Project" and selects their project in the file picker dialog. Tauri will then extend the fs scope with the selected path automatically so you can immediatly use the fs javascript apis. |
Beta Was this translation helpful? Give feedback.
It saves scope configs added via these apis https://docs.rs/tauri/latest/tauri/scope/struct.FsScope.html, the built-in dialog, and file drops (if tauri's file drop is enabled) to disk so they are preserved across app restarts.
Example: Imagine you're working on a code editor, your user clicks on "Open Project" and selects their project in the file picker dialog. Tauri will then extend the fs scope with the selected path automatically so you can immediatly use the fs javascript apis.
Now without the plugin, users would have to click on "Open Project" again after restarting the app. With the plugin you could add a session restore feature (== the last used project is opened automatically) wi…