-
Hi! Forgive me if this is a noob question, but recompiles have been pretty taxing, and I'm relatively new to mobile development. I found a similar 'unanswered' question from a year ago that referenced some things from v1. Some of what was referenced appears deprecated, and I'm running into some road blocks in development- so wanted to reach out before I pour too much time into this. My app is going to be reading some files on start-up/actively (likely bincode) which will need to be deserialized in the backend- data will be queried occasionally from the front. I see that plugin allows you to read from the front end, but it seems like I'm running into some permissions issues- I cant create files anywhere or read files from anywhere in rust. Whenever I try to create a directory relative to the current directory I receive I'm hoping this is a permissions thing, but haven't had any luck with that line either. I was trying to avoid looking up directories on the front end and sending messages to the backend since that seems a bit unsafe- anyone have any advice? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
What does internal storage mean? Is it private storage for the app only, or the device’s built-in storage (as opposed to an SD card)? |
Beta Was this translation helpful? Give feedback.
If it is the former, you can get an app-specific directory path as follows.
In the latter case, it is a bit of a hassle.
It must be read and written using tauri_plugin_fs and tauri_plugin_dialog. This article is helpful, This is done on the frontend, but can also be done on the backend, since a similar function exists there.
There is also an Android file system plugin, although it is not compatible with other platforms.