Appending data to an existing file.

Discussion and help for Easy Save 3
Post Reply
ramtam
Posts: 1
Joined: Mon Sep 26, 2022 5:54 am

Appending data to an existing file.

Post 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?
User avatar
Joel
Moodkie Staff
Posts: 4826
Joined: Wed Nov 07, 2012 10:32 pm

Re: Appending data to an existing file.

Post 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
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Post Reply