[v2] Requesting A example of how I access to arbitrary filesystem paths. #9339
-
In |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
You could ask them with a folder dialog which will extend the scope for the selected folder automatically and if you use the persisted-scope plugin it will even persist between app starts. Alternatively |
Beta Was this translation helpful? Give feedback.
-
I hope to provide an extremely simple interactive way. Because I only need to query specific game directories, as I query the installation directory of Steam through the registry, and then parse Steam's configuration file to find the game installation directory, I hope this process is automatic and does not require manual operation by the user, so it is difficult to set the scope. Is there a feature that allows scope adjustment through code within a certain scope? Like: import { createScopedAcl } from '@tauri-app/api'
const acl = createScopedAcl()
acl.permissions({
"identifier": "fs:scope",
"allow": [{"path": "**/*"}]
}, async () => {
await copyFile('a', 'b')
}) |
Beta Was this translation helpful? Give feedback.
You could ask them with a folder dialog which will extend the scope for the selected folder automatically and if you use the persisted-scope plugin it will even persist between app starts.
Alternatively
**
should still work as part of the new ACL: https://beta.tauri.app/features/file-system/#permissions