Page 1 of 1

Appending data to an existing file.

Posted: Mon Sep 26, 2022 5:57 am
by ramtam
Hi
I'm using ES3 to save and load textual data in my current project. I want to append text to an existing file, but I don't see any option for that. I know I can append raw strings, but I would like to keep the key component since I have a few categories of data that I would like to access separately. Is there a way to append data to a file?

Re: Appending data to an existing file.

Posted: Tue Sep 27, 2022 6:48 am
by Joel
Hi there,

If you want to append data to a file which uses keys then you would simply specify a separate key. I.e.

Code: Select all

ES3.Save("myKey1", myComponent);
ES3.Save("myKey2", myOtherComponent);
Note that you cannot use AppendRaw with a file which uses keys because it would modify the format in such a way that it could no longer be parsed.

All the best,
Joel