tauri-apps / tauri-apps/plugins-workspace

Does fs plugin even work on android?

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

Description

As of right now(fs version 2.0.0, tauri version 2.1.1) fs plugin doesn't seem to do anything besides throwing errors, at least for me. I assume I have correct permissions:
```json
{
"identifier": "fs:scope",
"allow": [
{
"path": "$DOWNLOAD"
},
{
"path": "$DOWNLOAD/**"
},
{
"path": "$APPDATA"
},
{
"path": "$APPDATA/**"
}
]
},
{
"identifier": "fs:allow-write",
"allow": [
{
"path": "$DOWNLOAD"
},
{
"path": "$DOWNLOAD/**"
},
{
"path": "$APPDATA"
},
{
"path": "$APPDATA/**"
}
]
},
```
and correct code
```ts
await copyFile("file.pdf", "file.pdf", { fromPathBaseDir: BaseDirectory.AppConfig, toPathBaseDir: BaseDirectory.Download});
```

With this setup I don't get any errors, but I also don't get any files in Downloads directory. Can someone try to copy some file to Downloads directory on android?

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.