Copying or generating a file is file doesn't exist

Discussion and help for Easy Save 3
Post Reply
jisaacs1207
Posts: 1
Joined: Mon Jan 11, 2021 8:29 pm

Copying or generating a file is file doesn't exist

Post by jisaacs1207 »

I am trying to copy a file from my projects /Assets/Resources/dijfeoji.csv to the persistent data path if it doesn't already exist when the app is opened, is this possible? What I am doing is trying to ensure a database is present... if not copy it from a local folder.... then try to sync it from the web with es3. This is so the user doesn't need to be on the internet on first load necessarily.
User avatar
Joel
Moodkie Staff
Posts: 4849
Joined: Wed Nov 07, 2012 10:32 pm

Re: Copying or generating a file is file doesn't exist

Post by Joel »

Hi there,

You can do this using ES3.LoadRawBytes with the save location set to Resources (see the Resources guide for an example of how to set the location to Resources using an ES3Settings object: https://docs.moodkie.com/easy-save-3/es ... resources/), and then ES3.SaveRaw with the save location set to File to save the loaded bytes to a file.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Post Reply