Skip to content
Discussion options

You must be logged in to vote

If it is the former, you can get an app-specific directory path as follows.

fn example(app: &tauri::AppHandle) -> tauri::Result<()> {
    use tauri::Manager as _;

    // Apps can fully manage entries within this directory with std::fs.
    let private_dir_path: std::path::PathBuf = app.path().app_data_dir()?;

    Ok(())
}

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.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@aiueo13
Comment options

Answer selected by tyrsday29
@tyrsday29
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants