Hi Guys,
Sorry, there is currently no binary mode for the app.WriteFile function. The only 'non-standard' mode supported is "ASCII" at the moment.
I'll put it on the 'Todo' list. :)
If you just need to save and load binary data, you could probably use the JavaScript btoa() an atob() functions to convert to base64. But this won't help with saving zip files tho.
For downloading files (including zip files) direct to sdcard, you can use the app.CreateDownloader() method like this:-
:
dload = app.CreateDownloader();
dload.SetOnComplete( dload_OnComplete );
dload.Download( srcFileUrl, targetDir );
:
You can pass a comma seperated list of file urls to download.
You can use dload.IsComplete(), dload.GetProgress() and dload.GetSize() methods too.
Regards
David