Databuffer save?

Jimmy

New member
3rd Party Module Dev
Tutorial Author
Joined
Jan 2, 2020
Messages
569
How do you save a databuffer? I've managed to load one using databuffer.Load and it works great (using desktop and HTML5 for this).
Now I need to save it but I can't find a Databuffer.Save?

I spend a few hours with FileStream but seems limited to cerberus://internal/ so that's no option I guess.
 

MikeHart

Administrator
Joined
Jun 19, 2017
Messages
2,812
No, FileStream is able to save everywhere on the desktop platforms. Of course that depends if the OS permits writing to a file location. MacOS is pretty strict on this part.
 

Jimmy

New member
3rd Party Module Dev
Tutorial Author
Joined
Jan 2, 2020
Messages
569
Thanks. Yes MacOS asks the user the first time when you want to save externally but it feels good it's not in the way, so I'm happy that FileStream works on desktop. Android and iOS I guess will some added code to be able load save and share files.

Actually I saw that Android has existing modules that works without problem, it behaves very nicely, so loading files I would consider works perfect on Android, but there's no code for saving sounds and pictures or sharing them using intent but that's reasonable.

So I guess this is only problem is HTML5 here. It's such a different beast I guess. I'll try a few weeks to make it work.
 

Gerry Quinn

New member
Tutorial Author
Joined
Jun 24, 2017
Messages
144
My understanding is you can't save anything on HTML except with SaveState(). Unless you are uploading to a server or something.

I've been using it recently, but just using GLFW (with FileStream) to create data files that HTML can load from the data directory using DataBuffer.Load()
 
Top Bottom