DeleteKey & Sync

Discussion and help for Easy Save 3
Post Reply
User avatar
Gustav
Posts: 9
Joined: Sat May 06, 2017 8:57 am

DeleteKey & Sync

Post by Gustav »

Hi,

I'm a bit confused by the documentation.

Here it says:
If syncWithFile was set to true when creating the ES3File, or this parameter was not set, individual keys in the file in storage will be overwritten and any keys deleted from this ES3File will not be removed from the file in storage.
But on the same page in the examples it says:
[...]
// Delete some key from the ES3File.
es3File.DeleteKey("myInt");
es3File.DeleteKey("myString");

// Sync the file so the file in storage is the same as our ES3File.
es3File.Sync();
But according to the first quote the ES3File cannot be the same as the file in storage because deleted keys will not be removed from the file in storage. Where is the error?

Regards,
Gustav
User avatar
Joel
Moodkie Staff
Posts: 4846
Joined: Wed Nov 07, 2012 10:32 pm

Re: DeleteKey & Sync

Post by Joel »

Hi there,

Thanks for the heads-up, it looks like the doc for this was rolled back to when keys were not deleted on sync. Just to clarify, keys will be deleted when you call Sync() with syncWithFile set to true.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
User avatar
Gustav
Posts: 9
Joined: Sat May 06, 2017 8:57 am

Re: DeleteKey & Sync

Post by Gustav »

That makes perfectly sense. I'm glad I could help.
Post Reply