plugins-workspace icon indicating copy to clipboard operation
plugins-workspace copied to clipboard

feat(fs): use IPC streaming for read and write file

Open lucasfernog opened this issue 1 year ago • 1 comments

The HTTP request API already uses the streaming IPC, let's do the same for the fs functions.

Needs https://github.com/tauri-apps/tauri/pull/9561 since we pass the path and the options as headers on the writeFile command.

lucasfernog avatar Apr 24 '24 18:04 lucasfernog

Looking forward to merge this...

DexYang avatar May 16 '24 02:05 DexYang

Hi, I'm currently experiencing issues with read / write file (binary), after updating dependencies in v2.

In js api, readfile returns an empty buffer.

The writeFile throws "invalid args pathfor commandwrite_file: command write_file expected a value for key path but the IPC call used a bytes payload". The path is very well a a string.

I suspect the issue might be due to the changes made for this issue #1251.

Any ideas? Many thanks.

ezzaouia avatar Jun 14 '24 20:06 ezzaouia

@ezzaouia This sounds like you only updated the rust crate but not the js package of the plugin, can you check that both are up to date?

FabianLars avatar Jun 15 '24 12:06 FabianLars

Thank you very much Fabian, indeed, js package was not up to date with rust. My issue is resolved upon the update of both sides.

Happy WE.

ezzaouia avatar Jun 15 '24 12:06 ezzaouia