Copying or generating a file is file doesn't exist
-
- Posts: 1
- Joined: Mon Jan 11, 2021 8:29 pm
Copying or generating a file is file doesn't exist
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.
Re: Copying or generating a file is file doesn't exist
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
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