Advantages of @tauri/fs vs Node/JS fs? #2738
-
Hi all, I was wondering if there were any advantages to using the Tauri "fs" package vs. the built-in Node/JavaScript "fs" package for handling and dealing with files. I was hoping to adjust permissions on files and directories using Any suggestions? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The main advantage of tauris fs api is that it actually works in tauri windows lol. Tauri apps don't run in a nodejs context. It's kinda similar to trying to use nodejs in a browser. To solve the problem you could use https://doc.rust-lang.org/std/os/unix/fs/trait.PermissionsExt.html if know rust or execute a Command consisting of a chmod/chown call otherwise. |
Beta Was this translation helpful? Give feedback.
The main advantage of tauris fs api is that it actually works in tauri windows lol. Tauri apps don't run in a nodejs context. It's kinda similar to trying to use nodejs in a browser.
To solve the problem you could use https://doc.rust-lang.org/std/os/unix/fs/trait.PermissionsExt.html if know rust or execute a Command consisting of a chmod/chown call otherwise.
(it's possible that i missed a better alternative here...)