#Can you work with files outside of user path?

4 messages · Page 1 of 1 (latest)

icy bronze
#

Is there a recommended way the JavaScript APIs to get to the following example directory on macOS <HD>/Library/Audio/Plug-Ins, that is not within the user directory?

Not sure if I’m just not interpreting the docs correctly or this is a security issues and not recommended.

fresh patrol
#

allowing specific paths is not necessarily a security issue by itself. Allowing all path or paths you don't even need would be though.
And about the "recommended" thing, generally we try to encourage people to give js the least amount of access as possible (and use rust for the juicy stuff), but that's not a requirement and we implemented the scope etc to make that more secure for those who can't use rust yet.

#

So if that path is the same for every system i'd just hard code it in the scope. If it's a user selected on then using tauri's dialog api will automatically extend the scope at runtime

icy bronze
#

Would be the same for ever Mac, but obviously not other OS’ like Windows which I would worry about next.

So I should be able to add this to scope hardcoded and then access it through the use of the fs api for example to affect the files as I wish?